### Question:
HttpHeadersImpl implements HttpHeaders { public MultivaluedMap<String, String> getRequestHeaders() { boolean splitIndividualValue = MessageUtils.getContextualBoolean(message, HEADER_SPLIT_PROPERTY, false); if (splitIndividualValue) { Map<String, List<String>> newHeaders = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); for (Map.Entry<String, List<String>> entry : headers.entrySet()) { newHeaders.put(entry.getKey(), getRequestHeader(entry.getKey())); } return new MetadataMap<String, String>(Collections.unmodifiableMap(newHeaders), false); } return new MetadataMap<String, String>(Collections.unmodifiableMap(headers), false); } HttpHeadersImpl(Message message); List<MediaType> getAcceptableMediaTypes(); Map<String, Cookie> getCookies(); Locale getLanguage(); MediaType getMediaType(); MultivaluedMap<String, String> getRequestHeaders(); List<Locale> getAcceptableLanguages(); List<String> getRequestHeader(String name); Date getDate(); String getHeaderString(String headerName); int getLength();  }### Answer:
@Test public void testGetHeaders() throws Exception { Message m = createMessage(createHeaders()); m.put(HttpHeadersImpl.HEADER_SPLIT_PROPERTY, "true"); HttpHeaders h = new HttpHeadersImpl(m); MultivaluedMap<String, String> hs = h.getRequestHeaders(); List<String> acceptValues = hs.get("Accept"); assertEquals(3, acceptValues.size()); assertEquals("text/bar;q=0.6", acceptValues.get(0)); assertEquals("text*"); }
@Test public void testGetContentTypeLowCase() throws Exception { Message m = new MessageImpl(); Map<String, List<String>> headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); headers.put("content-type", Collections.singletonList("text/plain")); m.put(Message.PROTOCOL_HEADERS, headers); HttpHeaders h = new HttpHeadersImpl(m); assertEquals("text/plain", h.getRequestHeaders().getFirst("Content-Type")); }