### Question:
SamtoolsFlagstatsParser { public static SamtoolsFlagstats parse(Path path) throws IOException { try (FileReader fr = new FileReader(path.toFile())) { return parse(fr); } }  static SamtoolsFlagstats parse(Path path); static SamtoolsFlagstats parse(Reader fr);  }### Answer:
@Test public void testParse() throws IOException { SamtoolsFlagstats actual = SamtoolsFlagstatsParser.parse(new InputStreamReader(new ByteArrayInputStream(flagstats.getBytes()))); SamtoolsFlagstats expected = new SamtoolsFlagstats() .setTotalReads(100) .setTotalQcPassed(75) .setSecondaryAlignments(101) .setSupplementary(102) .setDuplicates(103) .setMapped(104) .setPairedInSequencing(105) .setRead1(106) .setRead2(107) .setProperlyPaired(108) .setSelfAndMateMapped(109) .setSingletons(110) .setMateMappedToDiffChr(111) .setDiffChrMapQ5(112); assertEquals(expected, actual); }