String payload = "hogehogehogehogehoge";
WARCRecordInfo recinfo = new TestWARCRecordInfo(
TestWARCRecordInfo.buildHttpResponseBlock("200 OK",
"text/plain", payload.getBytes("UTF-8"), true));
TestWARCReader ar = new TestWARCReader(recinfo);
WARCRecord rec = ar.get(0);
WarcResource res = new WarcResource(rec, ar);
res.parseHeaders();
assertEquals("statusCode", 200, res.getStatusCode());
assertEquals("content-type", "text/plain", res.getHeader("Content-Type"));