@Test
public void testWriteResponseShouldProcessResponse() throws IOException {

    //GIVEN
    given(stubResponseGenerator.generateResponse(req, resp)).willReturn(byteArray);
    //WHEN
    underTest.writeResponse(req, resp);
    //THEN
    verify(stubResponseProcessor).processResponse(req, resp, byteArray);
}