@Test
public void testGetWriter() throws IOException {

    PrintWriter os = createMock(PrintWriter.class);
    expect(responseDelegate.getWriter()).andReturn(os);
    replay(applicationContext, request, response, os, portletContext, requestDelegate, responseDelegate);
    assertEquals(req.getWriter(), os);
    verify(applicationContext, request, response, os, portletContext, requestDelegate, responseDelegate);
}