HttpServletResponseWrapper extends ServletResponseWrapper implements HttpServletResponse { @Override public boolean containsHeader(String name) { return getWrapped().containsHeader(name); } HttpServletResponseWrapper(HttpServletResponse response); @Override void addCookie(Cookie cookie); @Override void addDateHeader(String name, long date); @Override void addHeader(String name, String value); @Override void addIntHeader(String name, int value); @Override boolean containsHeader(String name); @Override String encodeRedirectURL(String url); @Deprecated @Override String encodeRedirectUrl(String url); @Override String encodeURL(String url); @Deprecated @Override String encodeUrl(String url); @Override String getHeader(String name); @Override Collection<String> getHeaders(String name); @Override Collection<String> getHeaderNames(); @Override int getStatus(); @Override void sendError(int status); @Override void sendError(int status, String message); @Override void sendRedirect(String location); @Override void setDateHeader(String name, long date); @Override void setHeader(String name, String value); @Override void setIntHeader(String name, int value); @Override void setStatus(int status); @Deprecated @Override void setStatus(int status, String message);  }
@Test void testContainsHeader() { TestHttpServletResponse wrapped = new TestHttpServletResponse(null); HttpServletResponseWrapper wrapper = new HttpServletResponseWrapper(wrapped); wrapper.addIntHeader("int", 1); assertTrue(wrapper.containsHeader("int")); }