### Question:
HttpCacheEntry implements MessageHeaders, Serializable { @Override public Header getFirstHeader(final String name) { if (REQUEST_METHOD_HEADER_NAME.equalsIgnoreCase(name)) { return null; } return responseHeaders.getFirstHeader(name); } HttpCacheEntry(
            final Date requestDate,
            final Date responseDate,
            final int status,
            final Header[] responseHeaders,
            final Resource resource,
            final Map<String, String> variantMap);  HttpCacheEntry(final Date requestDate, final Date responseDate, final int status,
            final Header[] responseHeaders, final Resource resource); int getStatus(); Date getRequestDate(); Date getResponseDate(); @Override Header[] getHeaders(); @Override Header getFirstHeader(final String name); @Override Header getLastHeader(final String name); @Override Header[] getHeaders(final String name); @Override boolean containsHeader(final String name); @Override int countHeaders(final String name); @Override Header getHeader(final String name); @Override Iterator<Header> headerIterator(); @Override Iterator<Header> headerIterator(final String name); Date getDate(); Resource getResource(); boolean hasVariants(); Map<String, String> getVariantMap(); String getRequestMethod(); @Override String toString();  }### Answer:
@Test public void testGetFirstHeaderReturnsCorrectHeader() { final Header[] headers = { new BasicHeader("foo", "fooValue"), new BasicHeader("bar", "barValue1"), new BasicHeader("bar", "barValue2") }; entry = makeEntry(headers); assertEquals("barValue1", entry.getFirstHeader("bar").getValue()); }
@Test public void testGetFirstHeaderReturnsNullIfNoneMatch() { final Header[] headers = { new BasicHeader("foo", "fooValue"), new BasicHeader("bar", "barValue1"), new BasicHeader("bar", "barValue2") }; entry = makeEntry(headers); assertEquals(null, entry.getFirstHeader("quux")); }