### Question:
DefaultTimeSpanSet implements TimeSpanSet { @Override public boolean remove(Object o) { TimeSpan ts = getAsTimespan(o); if (ts != null) { return remove(ts); } return false; } DefaultTimeSpanSet();  DefaultTimeSpanSet(TimeSpan ts);  DefaultTimeSpanSet(TimeSpanSet other); @Override boolean add(TimeSpan e); @Override final boolean add(TimeSpanSet other); @Override boolean addAll(Collection<? extends TimeSpan> c); @Override void clear(); @Override boolean contains(Date aDate); @Override boolean contains(long aTime); @Override boolean contains(Object o); @Override boolean contains(TimeSpan value); @Override boolean containsAll(Collection<?> c); @Override boolean equals(Object obj); @Override List<TimeSpan> getTimeSpans(); @Override int hashCode(); @Override TimeSpanSet intersection(TimeSpan ts); @Override TimeSpanSet intersection(TimeSpanSet otherSet); @Override boolean intersects(TimeSpan value); @Override boolean intersects(TimeSpanProvider ts); @Override boolean intersects(TimeSpanSet other); @Override boolean isEmpty(); @Override Iterator<TimeSpan> iterator(); @Override boolean remove(Object o); @Override boolean remove(TimeSpan spanToRemove); @Override boolean remove(TimeSpanSet other); @Override boolean removeAll(Collection<?> c); @Override boolean retainAll(Collection<?> c); @Override int size(); @Override Object[] toArray(); @Override T[] toArray(T[] a); @Override String toString(); @Override TimeSpanSet union(TimeSpanSet other);  }### Answer:
@Test public void testRemove() { long[] setA = { 1, 2, 3, 5, 6, 8, 9, 11, 12, 13, 14, 15 }; DefaultTimeSpanSet rls = new DefaultTimeSpanSet(); rls.addAll(createTestTimeSpans(setA)); rls.add(TimeSpan.get(55, 100)); assertEquals(5, rls.size()); boolean changed = rls.remove(TimeSpan.get(54, 57)); assertTrue(changed); assertEquals(5, rls.size()); changed = rls.remove(TimeSpan.get(10, 13)); assertTrue(changed); assertEquals(5, rls.size()); changed = rls.remove(TimeSpan.get(1, 2)); assertTrue(changed); assertEquals(5, rls.size()); changed = rls.remove(TimeSpan.get(14, 21)); assertTrue(changed); assertEquals(5, rls.size()); changed = rls.remove(TimeSpan.get(98, 111)); assertTrue(changed); assertEquals(5, rls.size()); rls.add(TimeSpan.get(1, 2)); changed = rls.remove(TimeSpan.get(2, 4)); assertTrue(changed); assertEquals(5, rls.size()); changed = rls.remove(TimeSpan.get(60, 66)); assertTrue(changed); assertEquals(6, rls.size()); changed = rls.remove(TimeSpan.get(60, 66)); assertFalse(changed); assertEquals(6, rls.size()); changed = rls.remove(TimeSpan.get(57, 60)); assertTrue(changed); assertEquals(5, rls.size()); changed = rls.remove(TimeSpan.get(3, 8)); assertTrue(changed); assertEquals(4, rls.size()); changed = rls.remove(TimeSpan.get(7, 61)); assertTrue(changed); assertEquals(2, rls.size()); }