@Test
public void testDoGetShouldWriteActualJsonToResponse() throws ServletException, IOException, JsonTransformationException {

    //GIVEN
    given(request.getHeader("User-Agent")).willReturn("windows");
    given(stubResourceHolder.getActualStubConfigJsonObject(DEFAULT_GROUPNAME)).willReturn(jsonObject);
    byte[] jsonAsByteArray = "DOCUMENT".getBytes();
    given(jsonBasedObjectTransformer.transform(jsonObject)).willReturn(jsonAsByteArray);
    given(byteArrayConverter.toString(jsonAsByteArray)).willReturn(FILE_CONTENT);
    //WHEN
    underTest.doGet(request, response);
    //THEN
    verify(writer).write("content \r\n newline");
    verify(writer).flush();
    verify(writer).close();
}