private void checkHeaders(HttpRequest request, HttpResponse response) throws ParseException {
    assertEquals("Unexpected response status", HttpResponseStatus.ACCEPTED, response.status());
    assertEquals(HttpHeaderNames.CONTENT_TYPE + " does not match", request.headers().get(HttpHeaderNames.CONTENT_TYPE),
        response.headers().get(HttpHeaderNames.CONTENT_TYPE));
    assertEquals(HttpHeaderNames.CONTENT_LENGTH + " does not match",
        request.headers().get(HttpHeaderNames.CONTENT_LENGTH), response.headers().get(HttpHeaderNames.CONTENT_LENGTH));
    assertEquals(HttpHeaderNames.LOCATION + " does not match", request.headers().get(HttpHeaderNames.LOCATION),
        response.headers().get(HttpHeaderNames.LOCATION));
    assertEquals(HttpHeaderNames.LAST_MODIFIED + " does not match",
        request.headers().getTimeMillis(HttpHeaderNames.LAST_MODIFIED),
        response.headers().getTimeMillis(HttpHeaderNames.LAST_MODIFIED));
    assertEquals(HttpHeaderNames.EXPIRES + " does not match", request.headers().getTimeMillis(HttpHeaderNames.EXPIRES),
        response.headers().getTimeMillis(HttpHeaderNames.EXPIRES));
    assertEquals(HttpHeaderNames.CACHE_CONTROL + " does not match",
        request.headers().get(HttpHeaderNames.CACHE_CONTROL), response.headers().get(HttpHeaderNames.CACHE_CONTROL));
    assertEquals(HttpHeaderNames.PRAGMA + " does not match", request.headers().get(HttpHeaderNames.PRAGMA),
        response.headers().get(HttpHeaderNames.PRAGMA));
    assertEquals(HttpHeaderNames.DATE + " does not match", request.headers().getTimeMillis(HttpHeaderNames.DATE),
        response.headers().getTimeMillis(HttpHeaderNames.DATE));
    assertEquals(MockNettyMessageProcessor.CUSTOM_HEADER_NAME + " does not match",
        request.headers().get(MockNettyMessageProcessor.CUSTOM_HEADER_NAME),
        response.headers().get(MockNettyMessageProcessor.CUSTOM_HEADER_NAME));
  }
Checks the headers in the response match those in the request.
@param request the {@link HttpRequest} with the original value of the headers.
@param response the {@link HttpResponse} that should have the same value for some headers in {@code request}.
@throws ParseException
ambry-rest/src/test/java/com/github/ambry/rest/NettyResponseChannelTest.java