DefaultHttpHeaderManager implements HttpHeaderManager { @Override public void addHeader(String name, String value) { if (headers.containsKey(name.toUpperCase(locale))) { headers.get(name.toUpperCase(locale)).addValue(value); } else { DefaultHttpHeader header = new DefaultHttpHeader(name, value); headers.put(name.toUpperCase(locale), header); } } DefaultHttpHeaderManager(); @Override void addHeader(String name, String value); @Override boolean containsHeader(String name); @Override long getDateHeader(String name); @Override String getHeader(String name); @Override Enumeration<String> getHeaderNames(); @Override Enumeration<String> getHeaders(String name); @Override int getIntHeader(String name); @Override void setHeader(String name, String value);  }
@Test void testAddHeader() { DefaultHttpHeaderManager manager = new DefaultHttpHeaderManager(); manager.addHeader("NAME", "VALUE"); assertEquals("VALUE", manager.getHeader("NAME")); }