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

    SynchronizationEvent synchronizationEvent = mock(SynchronizationEvent.class);
    when(synchronizationEvent.isSatisfied()).thenReturn(false);
    SignalizationBasedEventSynchronizer signalizationBasedEventSynchronizer = new SignalizationBasedEventSynchronizer(timeout);
    Thread signalizingThread = new Thread(new SignalizingRunnable(signalizationBasedEventSynchronizer, synchronizationEvent));
    signalizingThread.start();
    signalizationBasedEventSynchronizer.awaitUntil(synchronizationEvent);
    signalizingThread.join();
}