GermlineReportingFile { @NotNull public static GermlineReportingModel buildFromCsv(@NotNull String germlineGenesCsv) throws IOException { List<String> linesGermlineGenes = LineReader.build().readLines(new File(germlineGenesCsv).toPath(), line -> line.length() > 0); Map<String, Boolean> germlineGenesAndNotifyMap = Maps.newHashMap(); for (String line : linesGermlineGenes) { String[] parts = line.split(SEPARATOR); if (parts.length == 2) { String gene = parts[0].trim(); String notifyGene = parts[1].trim().toLowerCase(); switch (notifyGene) { case "true": germlineGenesAndNotifyMap.put(gene, true); break; case "false": germlineGenesAndNotifyMap.put(gene, false); break; default: LOGGER.warn("Could not interpret notification string in germline reporting genes: {}", notifyGene); } } else { LOGGER.warn("Suspicious line detected in germline reporting genes: {}", line); } } return new GermlineReportingModel(germlineGenesAndNotifyMap); } private  GermlineReportingFile(); @NotNull static GermlineReportingModel buildFromCsv(@NotNull String germlineGenesCsv);  }
@Test public void canLoadGermlineGenesReportingCsv() throws IOException { GermlineReportingModel germlineReportingModel = GermlineReportingFile.buildFromCsv(GERMLINE_GENES_REPORTING_CSV); assertEquals(3, germlineReportingModel.reportableGermlineGenes().size()); }