@Test
public void testWriteResponseShouldAnswerWithErrorWhenGetUnwantedRequest() throws IOException {

    //GIVEN
    given(stubResponseGenerator.generateResponse(req, resp)).willReturn(null);
    //WHEN
    underTest.writeResponse(req, resp);
    //THEN
    verify(resp).getOutputStream();
    verify(resp).setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
    verify(outputStream).write(ERROR_MESSAGE_FOR_UNWANTED_REQUESTS.getBytes());
    verify(outputStream).close();
}