@Test
public void awaitForEventDoesNotLockTheThreadIfEventIsAlreadySatisfied() throws TimeoutException, InterruptedException {

    SynchronizationEvent synchronizationEvent = mock(SynchronizationEvent.class);
    when(synchronizationEvent.isSatisfied()).thenReturn(true);
    Lock lock = mock(Lock.class);
    SignalizationBasedEventSynchronizer signalizationBasedEventSynchronizer = new SignalizationBasedEventSynchronizer(timeout, lock);
    signalizationBasedEventSynchronizer.awaitUntil(synchronizationEvent);
    verify(lock, never()).lock();
}