assertTrue("Expected logfile to exist: " + LOGFILE, logFile.exists());
assertHeader(logFile);
}
private void assertHeader(File file) throws Exception {
HtmlLayout layout = HtmlLayout.createDefaultLayout();
String header = new String(layout.getHeader(), Charset.defaultCharset());
String withoutTimestamp = header.substring(0, 435);
String contents = new String(slurp(file), Charset.defaultCharset());
String contentsInitialChunk = contents.substring(0, 435);
assertEquals(file.getName(), withoutTimestamp, contentsInitialChunk);
}