@ Override public Message call ( ) throws InterruptedException { AbstractExpectation . LOGGER . info ( "Thread blocked waiting for message to pass condition {}." , this . getBlockingCondition ( ) ) ; try { this . latch . await ( ) ; this . manager . unsetExpectation ( this ) ; AbstractExpectation . LOGGER . info ( "Condition passed." ) ; if ( this . actionFuture != null ) { this . waitUntilActionComplete ( ) ; } AbstractExpectation . LOGGER . info ( "Expectation processing passed." ) ; return this . stash ; } finally { this . manager . unsetExpectation ( this ) ; // in case await() throws this . actionFuture = null ; AbstractExpectation . LOGGER . info ( "Thread unblocked." ) ; } }
Will start the wait for the condition to become true .