### Question:
HttpResponseWrapper extends HttpServletResponseWrapper implements ResponseWithSessionId { @Override public final void sendError(int sc) throws IOException { request.propagateSession(); super.sendError(sc); } HttpResponseWrapper(HttpRequestWrapper request, HttpServletResponse response); @Override final void sendError(int sc); @Override final void sendError(int sc, String msg); @Override final void sendRedirect(String location); @Override SaveSessionServletOutputStream getOutputStream(); @Override PrintWriter getWriter(); @Override void addHeader(String name, String value); @Override void setHeader(String name, String value); @Override void setContentLength(int len); @Override void reset(); @Override String encodeURL(String url); @Override void flushBuffer();  }### Answer:
@Test public void testPropagateOnSendErrorInt() throws IOException { responseWrapper.sendError(404); verify(response).sendError(404); verify(requestWrapper).propagateSession(); }
@Test public void testPropagateOnSendErrorIntString() throws IOException { responseWrapper.sendError(404, "test"); verify(response).sendError(404, "test"); verify(requestWrapper).propagateSession(); }