@Test
public void testGetWriter() {

    HttpServletResponse wrappedResponse = createMock(HttpServletResponse.class);
    Writer writer = new StringWriter();
    PrintWriter printWriter = new PrintWriter(writer);
    replay(wrappedResponse);
    ExternalWriterHttpServletResponse response = new ExternalWriterHttpServletResponse(
            wrappedResponse, printWriter);
    assertEquals(printWriter, response.getWriter());
    verify(wrappedResponse);
}