@Test public void servletWriterAutoFlushedForCharArray() throws IOException { response.getWriter().write("XY".toCharArray()); assertEquals("XY", response.getContentAsString()); }