@Test
public void html_serializer() throws Exception {

    final SchemaParser.Request request;
    final Schema result;
    try (InputStream inputStream = this.getClass().getResourceAsStream("sales-force.xls")) {
        // We do know the format and therefore we go directly to the HTML schema guessing
        request = getRequest(inputStream, "#2");
        request.getMetadata().setEncoding("UTF-16");
        result = htmlSchemaGuesser.parse(request);
    }
    try (InputStream inputStream = this.getClass().getResourceAsStream("sales-force.xls")) {
        request.getMetadata().getRowMetadata().setColumns(result.getSheetContents().get(0).getColumnMetadatas());
        InputStream jsonStream = htmlSerializer.serialize(inputStream, request.getMetadata(), -1);
        String json = IOUtils.toString(jsonStream, UTF_8);
        logger.debug("json: {}", json);
        ObjectMapper mapper = new ObjectMapper();
        CollectionType collectionType =
                mapper.getTypeFactory().constructCollectionType(ArrayList.class, TreeMap.class);
        List<Map<String, String>> values = mapper.readValue(json, collectionType);
        logger.debug("values: {}", values);
        Map<String, String> row0 = values.get(0);
        Assertions.assertThat(row0).contains(MapEntry.entry("0000", "000001"), //
                MapEntry.entry("0001", "aaa"), //
                MapEntry.entry("0002", "France"), //
                MapEntry.entry("0003", "x@talend.com"));
    }
}