@Test
public void readChromosomalRegions() {

    List<ChromosomalRegion> expectedIntervals = new ArrayList<>();
    expectedIntervals.add(new GeneticInterval(7, 127471197, 127472363));
    expectedIntervals.add(new GeneticInterval(7, 127472364, 127473530));
    expectedIntervals.add(new GeneticInterval(7, 127475865, 127477031));
    expectedIntervals.add(new GeneticInterval(7, 127479366, 127480532));
    expectedIntervals.add(new GeneticInterval(7, 127480533, 127481699));
    Stream<ChromosomalRegion> regions = BedFiles.readChromosomalRegions(Paths.get("src/test/resources/intervals.bed"));
    assertThat(regions.collect(toList()), contains(expectedIntervals.toArray()));
}