PedFiles { public static Pedigree readPedigree(Path pedFile) { try (Stream<String> lines = Files.lines(pedFile)) { return parsePedigree(lines); } catch (Exception e) { logger.error("Error reading PED file {}", pedFile, e); throw new PedFilesException(String.format("Error reading PED file %s", pedFile), e); } } private  PedFiles(); static Pedigree readPedigree(Path pedFile); static Pedigree parsePedigree(Stream<String> lines);  }
@Test public void unknownFile() { assertThrows(RuntimeException.class, () -> PedFiles.readPedigree(Paths.get("wibble.ped"))); }
@Test public void readValidPedigree() { Pedigree readPedigree = PedFiles.readPedigree(TestPedigrees.trioWithChildAffectedPedPath()); assertThat(readPedigree, equalTo(TestPedigrees.trioChildAffected())); }