### Question:
TimeSeriesCollection extends AbstractIntervalXYDataset implements XYDataset, IntervalXYDataset, DomainInfo, XYDomainInfo,
        XYRangeInfo, VetoableChangeListener, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TimeSeriesCollection)) { return false; } TimeSeriesCollection that = (TimeSeriesCollection) obj; if (this.xPosition != that.xPosition) { return false; } if (!ObjectUtilities.equal(this.data, that.data)) { return false; } return true; } TimeSeriesCollection();  TimeSeriesCollection(TimeZone zone);  TimeSeriesCollection(TimeSeries series);  TimeSeriesCollection(TimeSeries series, TimeZone zone); @Override DomainOrder getDomainOrder(); TimePeriodAnchor getXPosition(); void setXPosition(TimePeriodAnchor anchor); List<TimeSeries> getSeries(); @Override int getSeriesCount(); int indexOf(TimeSeries series); TimeSeries getSeries(int series); TimeSeries getSeries(Comparable key); @Override Comparable getSeriesKey(int series); int getSeriesIndex(Comparable key); void addSeries(TimeSeries series); void removeSeries(TimeSeries series); void removeSeries(int index); void removeAllSeries(); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override Number getX(int series, int item); @Override synchronized Number getStartX(int series, int item); @Override synchronized Number getEndX(int series, int item); @Override Number getY(int series, int item); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); int[] getSurroundingItems(int series, long milliseconds); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); @Override Range getDomainBounds(List<Comparable> visibleSeriesKeys,
            boolean includeInterval); Range getRangeBounds(boolean includeInterval); @Override Range getRangeBounds(List<Comparable> visibleSeriesKeys, 
            Range xRange, boolean includeInterval); @Override void vetoableChange(PropertyChangeEvent e); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testEquals() { TimeSeriesCollection c1 = new TimeSeriesCollection(); TimeSeriesCollection c2 = new TimeSeriesCollection(); TimeSeries s1 = new TimeSeries("Series 1"); TimeSeries s2 = new TimeSeries("Series 2"); boolean b1 = c1.equals(c2); assertTrue("b1", b1); c1.addSeries(s1); c1.addSeries(s2); boolean b2 = c1.equals(c2); assertFalse("b2", b2); c2.addSeries(s1); c2.addSeries(s2); boolean b3 = c1.equals(c2); assertTrue("b3", b3); c2.removeSeries(s2); boolean b4 = c1.equals(c2); assertFalse("b4", b4); c1.removeSeries(s2); boolean b5 = c1.equals(c2); assertTrue("b5", b5); }