### Question:
TimeSpanList extends AbstractList<TimeSpan> implements Serializable { public static void mergeOverlaps(final List<TimeSpan> list) { mergeOverlaps(list, false); }  static TimeSpanList emptyList(); static void mergeOverlaps(final List<TimeSpan> list); static void mergeOverlaps(final List<TimeSpan> list, boolean mergeTouching); static TimeSpanList singleton(TimeSpan obj); abstract TimeSpanList clone(Collection<? extends TimeSpan> spans); boolean covers(TimeSpan other); boolean covers(TimeSpanList other); TimeSpan getExtent(); abstract TimeSpanList intersection(TimeSpan ts); abstract TimeSpanList intersection(TimeSpanList other); boolean intersects(TimeSpan timeSpan); abstract TimeSpanList union(TimeSpan ts); abstract TimeSpanList union(TimeSpanList other); static final TimeSpanList TIMELESS; }### Answer:
@Test public void testMergeOverlaps() { final TimeSpan ts0 = TimeSpan.get(8L, 20L); final TimeSpan ts1 = TimeSpan.get(1L, 6L); final TimeSpan ts2 = TimeSpan.get(2L, 2L); final TimeSpan ts3 = TimeSpan.get(19L, 25L); final TimeSpan ts4 = TimeSpan.get(24L, 26L); List<TimeSpan> list = new ArrayList<>(); list.add(ts0); list.add(ts1); list.add(ts2); list.add(ts3); list.add(ts4); TimeSpanList.mergeOverlaps(list); Assert.assertEquals(2, list.size()); Assert.assertEquals(TimeSpan.get(8L, 26L), list.get(0)); Assert.assertEquals(TimeSpan.get(1L, 6L), list.get(1)); }