String expectedAlertReportXml = Files.forIO()
.readFrom(getClass().getResourceAsStream("alertReport.xml"), "utf-8");
ExceptionConfigMock exceptionConfigManager = new ExceptionConfigMock();
AlertReport alertReport = new AlertReport(Constants.CAT);
TopReportVisitor visitor = new TopReportVisitor().setReport(alertReport).setExceptionConfigManager(
exceptionConfigManager);
alertReport.setStartTime(topReport.getStartTime());
alertReport.setEndTime(topReport.getEndTime());
visitor.visitTopReport(topReport);
Assert.assertEquals("Check the report result!", expectedAlertReportXml.replace("\r", ""), alertReport.toString()
.replace("\r", ""));
}