public static Resource createTestHtmlResource(byte[] payloadBytes) throws IOException {
WARCRecordInfo recinfo = TestWARCRecordInfo.createCompressedHttpResponse("text/html", payloadBytes);
TestWARCReader ar = new TestWARCReader(recinfo);
WARCRecord rec = ar.get(0);
WarcResource resource = new WarcResource(rec, ar);
resource.parseHeaders();
return resource;
}
public static Resource createTestRevisitResource(byte[] payloadBytes, boolean withHeader, boolean gzipContent) throws IOException {
WARCRecordInfo recinfo = TestWARCRecordInfo.createRevisitHttpResponse(
"text/html", payloadBytes.length, withHeader, gzipContent);