@Test
public void testWriteResponseShouldWriteResponseToServletOutputStream() throws IOException {

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