ZapReportUtil { public static File saveHtmlReport(ZapReport report) { return saveHtmlReport(report, DEFAULT_REPORTS_PATH); } private  ZapReportUtil(); static void saveAllReports(ZapReport report); static void saveAllReports(ZapReport report, String path); static File saveHtmlReport(ZapReport report); static File saveHtmlReport(ZapReport report, String path); static File saveXmlReport(ZapReport report); static File saveXmlReport(ZapReport report, String path); static File saveHtmlSpiderResults(ZapReport report); static File saveHtmlSpiderResults(ZapReport report, String path); static File saveXmlSpiderResults(ZapReport report); static File saveXmlSpiderResults(ZapReport report, String path);  }
@Test public void saveHtmlReportTest() throws IOException { File report = ZapReportUtil.saveHtmlReport(zapReport, TEST_DIR); assertTrue(report.isFile()); assertEquals(report.getName(), "zapReport.html"); assertEquals(Files.readAllBytes(report.toPath()), fakeReportBytes); report.delete(); }
@Test public void saveHtmlReportInDefaultLocationTest() throws IOException { File report = ZapReportUtil.saveHtmlReport(zapReport); assertTrue(report.isFile()); assertEquals(report.getName(), "zapReport.html"); assertEquals(Files.readAllBytes(report.toPath()), fakeReportBytes); report.delete(); }