MimeResponseDelegate implements ResponseDelegate { public OutputStream getOutputStream() throws IOException { return response.getPortletOutputStream(); } MimeResponseDelegate(MimeResponse response); OutputStream getOutputStream(); PrintWriter getPrintWriter(); Writer getWriter(); boolean isResponseCommitted(); void setContentType(String contentType);  }
@Test public void testGetOutputStream() throws IOException { OutputStream os = createMock(OutputStream.class); expect(response.getPortletOutputStream()).andReturn(os); replay(response, os); assertEquals(os, delegate.getOutputStream()); verify(response, os); }