@Test
public void testEnds() {

    List<Long> ends = ends(ranges);
    assertEquals(4, ends.size());
    assertEquals(Long.valueOf(0L), ends.get(0));
    assertEquals(Long.valueOf(1L), ends.get(1));
    assertEquals(Long.valueOf(43L), ends.get(2));
    assertEquals(Long.valueOf(43L), ends.get(3));
}