### Question:
ServletRequest extends AbstractClientRequest { public OutputStream getOutputStream() throws IOException { if (outputStream == null) { outputStream = response.getOutputStream(); } return outputStream; } ServletRequest(
            ApplicationContext applicationContext,
            HttpServletRequest request, HttpServletResponse response); Map<String, String> getHeader(); Addable<String> getResponseHeaders(); Map<String, String[]> getHeaderValues(); Map<String, String> getParam(); @SuppressWarnings("unchecked") Map<String, String[]> getParamValues(); @Override Map<String, Object> getContext(String scope); Map<String, Object> getRequestScope(); Map<String, Object> getSessionScope(); @Override List<String> getAvailableScopes(); void doForward(String path); void doInclude(String path); OutputStream getOutputStream(); Writer getWriter(); PrintWriter getPrintWriter(); boolean isResponseCommitted(); void setContentType(String contentType); Locale getRequestLocale(); HttpServletRequest getRequest(); HttpServletResponse getResponse(); boolean isUserInRole(String role);  }### Answer:
@Test public void testGetOutputStream() throws IOException { ServletOutputStream os = createMock(ServletOutputStream.class); expect(response.getOutputStream()).andReturn(os); replay(applicationContext, request, response, os); assertEquals(req.getOutputStream(), os); verify(applicationContext, request, response, os); }