@Test
public void testOutputCsvForOneParticipant() {

    ExportSettings exportSettings = createExportSettings(true, true, true, true, true, false, false, false, false);
    List<Participant> participants = new ArrayList<>();
    participants.add(participant);
    List<File> result = exporter.exportReport(exportSettings, participants, tripToExport, resourceResolver,
            new ActivityResolver() {
                @Override
                public Object getActivity() {
                    return null;
                }
            },
            amountFactory);
    Throwable exceptionCaught = null;
    try {
        Assert.assertEquals(4, result.size());
        Assert.assertTrue(match(result.get(0), patternCsvIndividual));
        Assert.assertTrue(match(result.get(1), patternCsvIndividual));
        Assert.assertTrue(match(result.get(2), patternCsvIndividual));
        Assert.assertTrue(match(result.get(3), patternCsvIndividual));
        for (File f : result) {
            Assert.assertTrue(nameContains(f, participant.getName()));
        }
    }
    catch (Exception e) {
        exceptionCaught = e;
    }
    finally {
        deleteCreatedFiles(result);
    }
    if (exceptionCaught != null) {
        throw new RuntimeException(exceptionCaught);
    }
}