@Test
public void testWhenActualSequenceIsNotNullShouldWaitForSequenceResponses() throws InterruptedException {

    //GIVEN
    WilmaSequence sequence = Mockito.mock(WilmaSequence.class);
    given(wilmaRequest.getHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID)).willReturn("abcd");
    String[] sequenceIds = new String[]{"id"};
    given(headerCreator.resolveSequenceHeader("abcd")).willReturn(sequenceIds);
    given(matcher.matchSequenceKeyWithDescriptor(SEQUENCE_DESCRIPTOR_KEY, sequenceIds)).willReturn(sequence);
    //WHEN
    underTest.generateResponse(request, response);
    //THEN
    verify(sequenceResponseGuard).waitForResponses(wilmaRequest, sequence);
}