HttpResponseWrapper extends HttpServletResponseWrapper implements ResponseWithSessionId { @Override public void flushBuffer() throws IOException { flushAndPropagate(); super.flushBuffer(); } 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();  }
@Test public void testPropagateOnFlushBuffer() throws IOException { responseWrapper.flushBuffer(); verify(response).flushBuffer(); verify(requestWrapper).propagateSession(); }