### Question:
ReplayingState { public void signalizeIfNoHttpQueriesInQueue() { if (httpRequestQueueIsEmpty() && synchronizationEventOptional.isPresent()) { SynchronizationEvent synchronizationEvent = synchronizationEventOptional.get(); if (synchronizationEvent.getName().equals(NO_HTTP_REQUESTS_IN_QUEUE)) { synchronizationEvent.signalizeIsDone(); synchronizationEventOptional = Optional.empty(); } } } @Inject  ReplayingState(@Named(BASE_URI) URI baseUri); boolean isSatisfied(String event); void setSynchronizationEvent(SynchronizationEvent synchronizationEventOptional); void setHttpLock(boolean lock); boolean isHttpLocked(); void setConditionSatisfied(String condition); void signalizeIfSynchronizationEventIsSatisfied(); void setConditionNotSatisfied(String condition); void addHttpRequestToQueue(HttpRequest httpRequest); boolean httpRequestQueueIsEmpty(); void signalizeIfNoHttpQueriesInQueue(); void removeHttpRequestFromQueue(HttpRequest httpRequest); void registerSubstitution(String valueToBeReplaced, String replacement); String getValue(String valueToBeReplaced); Map<String, String> getSubstitutions();  }### Answer:
@Test public void ifEventIsNotSetThenItDoesNotGetInvokedEventIfQueueIsEmpty() { ReplayingState replayingState = new ReplayingState(baseURI); SynchronizationEvent synchronizationEvent = mock(SynchronizationEvent.class); when(synchronizationEvent.getName()).thenReturn(NO_HTTP_REQUESTS_IN_QUEUE); replayingState.signalizeIfNoHttpQueriesInQueue(); verify(synchronizationEvent, never()).signalizeIsDone(); }