}
}
protected void assertContentHeadersEqual(HttpRequest request, String contentType, String contentDispositon,
String contentEncoding, String contentLanguage, Long length, byte[] contentMD5, Date expires) {
MutableContentMetadata md = request.getPayload().getContentMetadata();
if (request.getFirstHeaderOrNull(TRANSFER_ENCODING) == null) {
assertEquals(md.getContentLength(), length);
} else {
assertEquals(request.getFirstHeaderOrNull(TRANSFER_ENCODING), "chunked");
assert md.getContentLength() == null || md.getContentLength().equals(length);
}
assertEquals(md.getContentType(), contentType);
assertEquals(md.getContentDisposition(), contentDispositon);
assertEquals(md.getContentEncoding(), contentEncoding);
assertEquals(md.getContentLanguage(), contentLanguage);
assertEquals(md.getContentMD5(), contentMD5);
assertEquals(md.getExpires(), expires);
}