### Question:
TimeSpanArrayList extends TimeSpanList implements RandomAccess { @Override public TimeSpanList clone(Collection<? extends TimeSpan> spans) { return new TimeSpanArrayList(spans); } TimeSpanArrayList(Collection<? extends TimeSpan> timeSpans); @Override TimeSpanList clone(Collection<? extends TimeSpan> spans); @Override TimeSpan get(int index); List<TimeSpan> getTimeSpans(); @Override TimeSpanList intersection(TimeSpan ts); @Override TimeSpanList intersection(TimeSpanList other); @Override int size(); @Override TimeSpanList union(TimeSpan ts); @Override TimeSpanList union(TimeSpanList other);  }### Answer:
@Test public void testClone() { List<TimeSpan> list1 = new ArrayList<>(); list1.add(TimeSpan.get(1L, 4L)); list1.add(TimeSpan.get(5L, 7L)); list1.add(TimeSpan.get(9L, 11L)); TimeSpanList tsList = new TimeSpanArrayList(list1); List<TimeSpan> list2 = new ArrayList<>(list1); list2.add(TimeSpan.get(3L, 6L)); list2.add(TimeSpan.get(10L, 12L)); TimeSpanList clone = tsList.clone(list2); List<TimeSpan> expected = new ArrayList<>(); expected.add(TimeSpan.get(1L, 7L)); expected.add(TimeSpan.get(9L, 12L)); Assert.assertEquals(list1.size(), tsList.size()); Assert.assertTrue(tsList.containsAll(list1)); Assert.assertEquals(expected.size(), clone.size()); Assert.assertTrue(clone.containsAll(expected)); }