test_class.declarator: logger = LoggerFactory.getLogger(HtmlSchemaParserTest.class)
test_class.modifier: private final static
test_class.original_string: private final static Logger logger = LoggerFactory.getLogger(HtmlSchemaParserTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: htmlSchemaGuesser
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private HtmlSchemaParser htmlSchemaGuesser;
test_class.type: HtmlSchemaParser
test_class.var_name: htmlSchemaGuesser
test_class.declarator: htmlSerializer
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private HtmlSerializer htmlSerializer;
test_class.type: HtmlSerializer
test_class.var_name: htmlSerializer
test_class.declarator: htmlFormatFamily
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private HtmlFormatFamily htmlFormatFamily;
test_class.type: HtmlFormatFamily
test_class.var_name: htmlFormatFamily
test_class.declarator: unsupportedFormatFamily
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private UnsupportedFormatFamily unsupportedFormatFamily;
test_class.type: UnsupportedFormatFamily
test_class.var_name: unsupportedFormatFamily
test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/schema/html/HtmlSerializerTest.java
test_class.identifier: HtmlSerializerTest
test_class.superclass: extends AbstractSchemaTestUtils
test_case.body: @Test
      public void html_serializer_with_jira_export() throws Exception {
  
          final SchemaParser.Request request;
          final Schema result;
          try (InputStream inputStream = this.getClass().getResourceAsStream("jira_export.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("jira_export.xls")) {
  
              final List<ColumnMetadata> columns = result.getSheetContents().get(0).getColumnMetadatas();
              Assert.assertThat(columns.size(), is(98));
              request.getMetadata().getRowMetadata().setColumns(columns);
  
              InputStream jsonStream = htmlSerializer.serialize(inputStream, request.getMetadata(), -1);
  
              String json = IOUtils.toString(jsonStream, UTF_8);
              ObjectMapper mapper = new ObjectMapper();
              CollectionType collectionType =
                      mapper.getTypeFactory().constructCollectionType(ArrayList.class, TreeMap.class);
              List<Map<String, String>> values = mapper.readValue(json, collectionType);
              Map<String, String> row0 = values.get(0);
              for (String s : row0.keySet()) {
                  row0.put(s, row0.get(s).trim());
              }
              Assertions.assertThat(row0).contains(MapEntry.entry("0001", "TDP-1"));
          }
      }
test_case.class_method_signature: HtmlSerializerTest.html_serializer_with_jira_export()
test_case.full_signature: @Test public void html_serializer_with_jira_export()
test_case.identifier: html_serializer_with_jira_export
test_case.invocations: getResourceAsStream getClass getRequest setEncoding getMetadata parse getResourceAsStream getClass getColumnMetadatas get getSheetContents assertThat size is setColumns getRowMetadata getMetadata serialize getMetadata toString constructCollectionType getTypeFactory readValue get keySet put trim get contains assertThat entry
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void html_serializer_with_jira_export()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(HtmlSerializer.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(HtmlSerializer.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: executor
focal_class.modifier: @Resource(name = "serializer#html#executor")
      private
focal_class.original_string: @Resource(name = "serializer#html#executor")
      private TaskExecutor executor;
focal_class.type: TaskExecutor
focal_class.var_name: executor
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/schema/html/HtmlSerializer.java
focal_class.identifier: HtmlSerializer
focal_class.interfaces: implements Serializer
focal_class.class_method_signature: HtmlSerializer.serialize(InputStream rawContent, DataSetMetadata metadata, long limit)
focal_class.full_signature: @Override public InputStream serialize(InputStream rawContent, DataSetMetadata metadata, long limit)
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream rawContent, DataSetMetadata metadata, long limit)
focal_class.return: InputStream
focal_class.signature: InputStream serialize(InputStream rawContent, DataSetMetadata metadata, long limit)
focal_class.class_method_signature: HtmlSerializer.deserialize(InputStream rawContent, DataSetMetadata dataSetMetadata, OutputStream jsonOutput,
              long limit)
focal_class.full_signature: private void deserialize(InputStream rawContent, DataSetMetadata dataSetMetadata, OutputStream jsonOutput,
              long limit)
focal_class.identifier: deserialize
focal_class.modifiers: private
focal_class.parameters: (InputStream rawContent, DataSetMetadata dataSetMetadata, OutputStream jsonOutput,
              long limit)
focal_class.return: void
focal_class.signature: void deserialize(InputStream rawContent, DataSetMetadata dataSetMetadata, OutputStream jsonOutput,
              long limit)
focal_method.body: @Override
      public InputStream serialize(InputStream rawContent, DataSetMetadata metadata, long limit) {
          try {
              PipedInputStream pipe = new PipedInputStream();
              PipedOutputStream jsonOutput = new PipedOutputStream(pipe);
  
              Runnable r = () -> deserialize(rawContent, metadata, jsonOutput, limit);
              executor.execute(r);
              return pipe;
          } catch (IOException e) {
              throw new TDPException(CommonErrorCodes.UNABLE_TO_SERIALIZE_TO_JSON, e);
          }
      }
focal_method.class_method_signature: HtmlSerializer.serialize(InputStream rawContent, DataSetMetadata metadata, long limit)
focal_method.full_signature: @Override public InputStream serialize(InputStream rawContent, DataSetMetadata metadata, long limit)
focal_method.identifier: serialize
focal_method.invocations: deserialize execute
focal_method.modifiers: @Override public
focal_method.parameters: (InputStream rawContent, DataSetMetadata metadata, long limit)
focal_method.return: InputStream
focal_method.signature: InputStream serialize(InputStream rawContent, DataSetMetadata metadata, long limit)