@Test
public void testMergeSegments() throws Exception {

  List<Tuple<Long, Long>> segments = new ArrayList<>();
  segments.add(tuple(0L, 2449L));
  segments.add(tuple(4922L, 11284L));
  segments.add(tuple(14000L, 15000L));
  List<Tuple<Long, Long>> segments2 = new ArrayList<>();
  segments2.add(tuple(1449L, 3449L));
  segments2.add(tuple(11285L, 11290L));
  segments2.add(tuple(15000L, 16000L));
  List<Tuple<Long, Long>> mergedSegments = endpoint.mergeSegments(segments, segments2);
  assertEquals(5, mergedSegments.size());
}