@Test
public void should_serialize_csv_with_the_specified_encoding() throws IOException {

    InputStream inputStream = this.getClass().getResourceAsStream("x_mac_roman.csv");
    DataSetMetadata datasetMetadata = getSimpleDataSetMetadata("Titre", "Pr�nom");
    datasetMetadata.setEncoding("x-MacRoman");
    InputStream input = serializer.serialize(inputStream, datasetMetadata, -1);
    String actual = IOUtils.toString(input, UTF_8);
    // strange json because schema has not been detected
    String expected = "[{\"0000\":\",\\\"GÈrard\",\"0001\":null}]";
    Assert.assertEquals(expected, actual);
}