### Question:
MetadataEntityReader { public MetadataParsingResult readData(InputStream inputStream, Map<Integer, EntityTypeField> fields) throws IOException { LineProcessor<MetadataParsingResult> processor = new EntityLineProcessor(delimiter, parent, metadataClass, fields); try (Reader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { return CharStreams.readLines(reader, processor); } }  MetadataParsingResult readData(InputStream inputStream, Map<Integer, EntityTypeField> fields);  }### Answer:
@Test public void readData() throws Exception { Map<Integer, EntityTypeField> fields = getFields(); MetadataParsingResult expectedResult = getExpectedResult(); InputStream tabData = prepareInputData(MetadataParsingUtils.TAB_DELIMITER); MetadataParsingResult tabEntities = new MetadataEntityReader(MetadataParsingUtils.TAB_DELIMITER, parent, metadataClass) .readData(tabData, fields); compareResults(expectedResult, tabEntities); InputStream csvData = prepareInputData(MetadataParsingUtils.CSV_DELIMITER); MetadataParsingResult csvEntities = new MetadataEntityReader(MetadataParsingUtils.CSV_DELIMITER, parent, metadataClass) .readData(csvData, fields); compareResults(expectedResult, csvEntities); }