testInfo.getReport().error(new FakeException("Some exception here")).withAttachment("custom.txt", attachmentFile);
testInfo.getReport().info("Some detailed report").withDetails("Some details");
testInfo.getReport().getNodes().get(0).setTime(new Date(1399741000000L));
testInfo.getReport().getNodes().get(1).setTime(new Date(1399741000000L));
testInfos.add(testInfo);
new HtmlReportBuilder().build(testInfos, reportDirPath);
String expectedSuite1Html = trimEveryLine(IOUtils.toString(getClass().getResourceAsStream("/expected-reports/test-with-attachment.html")));
String realSuite1Html = trimEveryLine(FileUtils.readFileToString(new File(reportDirPath + "/report-1-home-page-test.html")));
Assert.assertEquals(expectedSuite1Html, realSuite1Html);