public void response_sent() throws IOException
{
String encoding = "UTF-8";
Response response = mockResponse();
CharArrayWriter writer = new CharArrayWriter();
PrintWriter pw = new PrintWriter(writer);
expect(response.getPrintWriter("application/json;charset=UTF-8")).andReturn(pw);
replay();
JSONArray array = new JSONArray(" [ \"fred\", \"barney\" \n\n]");
JSONArrayEventResultProcessor p = new JSONArrayEventResultProcessor(response, encoding);
p.processResultValue(array);
verify();
assertEquals(writer.toString(), "[\n \"fred\",\n \"barney\"\n]");
}