### Question:
HttpResponse { public Instant dateHeader(String k) { String d = header(k); return (d == null) ? null : parseDate(d); } HttpResponse(int status, Map<String, List<String>> headers);  HttpResponse(int status, Map<String, List<String>> headers, byte[] data); int status(); Map<String, List<String>> headers(); String header(String k); Instant dateHeader(String k); byte[] entity(); String entityAsString(); HttpResponse decompress(); @Override String toString();  }### Answer:
@Test public void dateHeaderNull() { Map<String, List<String>> headers = new HashMap<>(); HttpResponse res = new HttpResponse(200, headers); Assertions.assertNull(res.dateHeader("Date")); }
@Test public void dateHeaderGMT() { Map<String, List<String>> headers = new HashMap<>(); headers.put("Date", Collections.singletonList("Fri, 27 Jul 2012 17:21:03 GMT")); HttpResponse res = new HttpResponse(200, headers); Instant expected = Instant.ofEpochMilli(1343409663000L); Assertions.assertEquals(expected, res.dateHeader("Date")); }