### Question:
ImaBlacklistBaselineGenerator { public static ImaBlacklistBaseline generateBaselineFromCSV( final String baselineName, final InputStream inputStream ) throws IOException { Preconditions.checkArgument( !StringUtils.isBlank(baselineName), "Cannot generate a baseline with a blank name" ); ImaBlacklistBaseline blacklistBaseline = new ImaBlacklistBaseline(baselineName); updateBaselineFromCSVFile(blacklistBaseline, inputStream); return blacklistBaseline; } private  ImaBlacklistBaselineGenerator(); static ImaBlacklistBaseline generateBaselineFromCSV(
            final String baselineName,
            final InputStream inputStream
    ); static void updateBaselineFromCSVFile(
            final ImaBlacklistBaseline baseline,
            final InputStream inputStream
    );  }### Answer:
@Test public void testImportCsvWithDescriptions() throws IOException { InputStream is = ClassLoader.class.getResourceAsStream("/ima/IMABlacklistBaseline.csv"); ImaBlacklistBaseline imported = ImaBlacklistBaselineGenerator.generateBaselineFromCSV( "Test Baseline", is ); ImaBlacklistBaseline baseline = CSVGeneratorTest.getTestImaBlacklistBaselineWithDescriptions(); Assert.assertEquals(imported, baseline); Assert.assertEquals(imported.getRecords(), baseline.getRecords()); for (ImaBlacklistRecord baselineRecord : baseline.getRecords()) { boolean found = false; for (ImaBlacklistRecord importedRecord : imported.getRecords()) { if (baselineRecord.getDescription().equals(importedRecord.getDescription())) { found = true; } } if (!found) { Assert.fail("Did not find message in imported baseline: " + baselineRecord.getDescription()); } } }
@Test public void testImportCsvWithoutDescriptions() throws IOException { InputStream is = ClassLoader.class.getResourceAsStream( "/ima/IMABlacklistBaselineNoDescriptions.csv" ); ImaBlacklistBaseline imported = ImaBlacklistBaselineGenerator.generateBaselineFromCSV( "Test Baseline", is ); ImaBlacklistBaseline baseline = CSVGeneratorTest.getTestImaBlacklistBaselineWithDescriptions(); Assert.assertEquals(imported, baseline); Assert.assertEquals(imported.getRecords(), baseline.getRecords()); }