HartwigCohortFileReader { @NotNull public static List<HartwigCohortEntry> readCohortFile(@NotNull String fileName) throws IOException { return fromLines(Files.readAllLines(new File(fileName).toPath())); } private  HartwigCohortFileReader(); @NotNull static List<HartwigCohortEntry> readCohortFile(@NotNull String fileName);  }
@Test public void canReadHartwigCohortFile() throws IOException { List<HartwigCohortEntry> entries = HartwigCohortFileReader.readCohortFile(EXAMPLE_TSV); assertEquals(2, entries.size()); assertEquals("5", entries.get(0).chromosome()); assertEquals(1295228, entries.get(0).position()); assertEquals("G", entries.get(0).ref()); assertEquals("A", entries.get(0).alt()); assertEquals("TERT", entries.get(0).gene()); assertEquals("ENST00000310581", entries.get(0).transcript()); assertEquals(Strings.EMPTY, entries.get(0).proteinAnnotation()); assertEquals("7", entries.get(1).chromosome()); assertEquals(140453136, entries.get(1).position()); assertEquals("A", entries.get(1).ref()); assertEquals("T", entries.get(1).alt()); assertEquals("BRAF", entries.get(1).gene()); assertEquals("ENST00000288602", entries.get(1).transcript()); assertEquals("V600E", entries.get(1).proteinAnnotation()); }