### Question:
HttpHeadersImpl implements HttpHeaders { public Date getDate() { List<String> values = headers.get(HttpHeaders.DATE); if (values == null || values.isEmpty() || StringUtils.isEmpty(values.get(0))) { return null; } return HttpUtils.getHttpDate(values.get(0)); } 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 testGetDate() throws Exception { Message m = createMessage(createHeaders()); HttpHeaders h = new HttpHeadersImpl(m); List<String> dateValues = h.getRequestHeader("Date"); assertEquals(1, dateValues.size()); assertEquals("Tue, 21 Oct 2008 17:00:00 GMT", dateValues.get(0)); Date d = h.getDate(); String theDateValue = HttpUtils.getHttpDateFormat().format(d); assertEquals(theDateValue, "Tue, 21 Oct 2008 17:00:00 GMT"); }