@Test
public void getExporter_csv_exporter_should_write_csv_format() throws Exception {

    // given
    Map<String, String> arguments = new HashMap<>();
    arguments.put(ExportFormat.PREFIX + CSVFormat.ParametersCSV.FIELDS_DELIMITER, ";");
    arguments.put(ExportFormat.PREFIX + CSVFormat.ParametersCSV.ENCLOSURE_MODE,
            CSVFormat.ParametersCSV.ENCLOSURE_ALL_FIELDS);
    final OutputStream outputStream = new ByteArrayOutputStream();
    final Configuration configuration = Configuration
            .builder() //
            .args(arguments) //
            .format(CSV) //
            .output(outputStream) //
            .actions(IOUtils.toString(TransformerFactoryTest.class.getResourceAsStream("upper_case_firstname.json"),
                    UTF_8)) //
            .build();
    final Transformer transformer = factory.get(configuration);
    final String expectedCsv = IOUtils.toString(
            TransformerFactoryTest.class.getResourceAsStream("expected_export_preparation_uppercase_firstname.csv"),
            UTF_8);
    final InputStream inputStream =
            TransformerFactoryTest.class.getResourceAsStream("../../format/export_dataset.json");
    try (JsonParser parser = mapper.getFactory().createParser(inputStream)) {
        final DataSet dataSet = mapper.readerFor(DataSet.class).readValue(parser);
        // when
        transformer.buildExecutable(dataSet, configuration).execute();
        // then
        assertThat(outputStream.toString()).isEqualTo(expectedCsv);
    }
}