ScenarioCsvDownloadReport { protected void printRulesCounterLine(CSVPrinter printer, String rule, int times) throws IOException { printer.printRecord(Arrays.asList(rule, times)); }  String getReport(SimulationRunMetadata simulationRunMetadata, ScenarioSimulationModel.Type modelType);  }
@Test public void printRulesCounterLine() throws IOException { StringBuilder stringBuilder = new StringBuilder(); CSVPrinter printer = getCSVPrinter(stringBuilder); AuditLog auditLog = new AuditLog(); auditLog.addAuditLogLine(getAuditLogLine()); SimulationRunMetadata simulationRunMetadata = getSimulationRunMetadata(auditLog); Map.Entry<String, Integer> entry = simulationRunMetadata.getOutputCounter().entrySet().iterator().next(); scenarioCsvDownloadReport.printRulesCounterLine(printer, entry.getKey(), entry.getValue()); String retrieved = stringBuilder.toString(); List<String> data = Arrays.asList("\"" + entry.getKey() + "\"", String.valueOf(entry.getValue())); commonCheckRetrievedString(retrieved, data); }