@Test
public void testPrint() throws IOException {

    Path csvFilePath = temporaryFolder.newFile("csvFile.csv").toPath();
    final String delimiter = ";";
    final ReporterOutput csvReporter = ReporterOutputFactory.getReporterOutput("csv");
    csvReporter.setFilePath(csvFilePath);
    csvReporter.setResultType(SW360SparseRelease.class);
    final SW360SparseRelease sparseRelease = SW360TestUtils.mkSW3SparseRelease("test");
    csvReporter.print(Collections.singleton(sparseRelease));
    assertThat(csvFilePath).exists();
    final CSVParser csvParser = SW360TestUtils.getCsvParser(csvFilePath.toFile(), ';');
    final List<CSVRecord> records = csvParser.getRecords();
    assertThat(records).hasSize(1);
    assertThat(records.get(0).size()).isEqualTo(ReporterUtils.sparseReleaseCsvPrintHeader(delimiter).split(delimiter).length);
}