### Question:
DefaultTimeSpanSet implements TimeSpanSet { @Override public boolean contains(Date aDate) { return contains(aDate.getTime()); } 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 testContains() { long[] setA = { 1, 2, 5, 6, 8, 9, 11, 12, 13, 14, 15, 55, 56, 57 }; DefaultTimeSpanSet rlsA = new DefaultTimeSpanSet(); rlsA.addAll(createTestTimeSpans(setA)); assertEquals(5, rlsA.size()); DefaultTimeSpanSet rlsB = new DefaultTimeSpanSet(); rlsB.addAll(createTestTimeSpans(setA)); long[] setC = { 1, 2, 5, 6, 14, 15, 55, 56, 57 }; DefaultTimeSpanSet rlsC = new DefaultTimeSpanSet(); rlsC.addAll(createTestTimeSpans(setC)); assertEquals(rlsA, rlsB); assertFalse(rlsA.equals(rlsC)); assertEquals(rlsA.hashCode(), rlsB.hashCode()); assertTrue(rlsA.hashCode() != rlsC.hashCode()); DefaultTimeSpanSet emptySet = new DefaultTimeSpanSet(); assertTrue(emptySet.isEmpty()); assertFalse(rlsA.isEmpty()); assertFalse(rlsC.isEmpty()); rlsC.clear(); assertTrue(rlsC.isEmpty()); assertTrue(rlsA.contains(12)); assertTrue(rlsA.contains(55)); assertFalse(rlsA.contains(3)); assertFalse(rlsA.contains(16)); assertFalse(rlsA.contains(-1)); assertFalse(rlsA.contains(5000)); assertTrue(rlsA.contains(Long.valueOf(12))); assertTrue(rlsA.contains(Long.valueOf(55))); assertFalse(rlsA.contains(Long.valueOf(3))); assertFalse(rlsA.contains(Long.valueOf(16))); assertFalse(rlsA.contains(Long.valueOf(-1))); assertFalse(rlsA.contains(Long.valueOf(5000))); }