DiscFilterResponse { public abstract void addHeader(String name, String value); DiscFilterResponse(ServletOrJdiscHttpResponse parent); Enumeration<String> getAttributeNames(); Object getAttribute(String name); void setAttribute(String name, Object value); void removeAttribute(String name); HeaderFields getUntreatedHeaders(); List<Cookie> getUntreatedCookies(); abstract void setHeader(String name, String value); abstract void removeHeaders(String name); abstract void setHeaders(String name, String value); abstract void setHeaders(String name, List<String> values); abstract void addHeader(String name, String value); abstract String getHeader(String name); List<Cookie> getCookies(); abstract void setCookies(List<Cookie> cookies); int getStatus(); abstract void setStatus(int status); HttpResponse getParentResponse(); void addCookie(JDiscCookieWrapper cookie); void sendError(int errorCode); void setCookie(String name, String value);  }
@Test public void testAddHeader() { HttpRequest request = newRequest(URI.create("http: HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1); DiscFilterResponse response = new JdiscFilterResponse(HttpResponse.newInstance(HttpResponse.Status.OK)); response.addHeader("header1", "value1"); Assert.assertEquals(response.getHeader("header1"), "value1"); }