### Question:
TimeTableXYDataset extends AbstractIntervalXYDataset implements Cloneable, PublicCloneable, IntervalXYDataset, DomainInfo,
                   TableXYDataset { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TimeTableXYDataset)) { return false; } TimeTableXYDataset that = (TimeTableXYDataset) obj; if (this.domainIsPointsInTime != that.domainIsPointsInTime) { return false; } if (this.xPosition != that.xPosition) { return false; } if (!this.workingCalendar.getTimeZone().equals( that.workingCalendar.getTimeZone()) ) { return false; } if (!this.values.equals(that.values)) { return false; } return true; } TimeTableXYDataset();  TimeTableXYDataset(TimeZone zone);  TimeTableXYDataset(TimeZone zone, Locale locale); boolean getDomainIsPointsInTime(); void setDomainIsPointsInTime(boolean flag); TimePeriodAnchor getXPosition(); void setXPosition(TimePeriodAnchor anchor); void add(TimePeriod period, double y, Comparable seriesName); void add(TimePeriod period, Number y, Comparable seriesName,
                    boolean notify); void remove(TimePeriod period, Comparable seriesName); void remove(TimePeriod period, Comparable seriesName,
            boolean notify); void clear(); TimePeriod getTimePeriod(int item); @Override int getItemCount(); @Override int getItemCount(int series); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override Number getX(int series, int item); @Override double getXValue(int series, int item); @Override Number getStartX(int series, int item); @Override double getStartXValue(int series, int item); @Override Number getEndX(int series, int item); @Override double getEndXValue(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); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testEquals() { TimeTableXYDataset d1 = new TimeTableXYDataset(); TimeTableXYDataset d2 = new TimeTableXYDataset(); assertEquals(d1, d2); assertEquals(d2, d1); d1.add(new Year(1999), 123.4, "S1"); assertFalse(d1.equals(d2)); d2.add(new Year(1999), 123.4, "S1"); assertEquals(d1, d2); d1.setDomainIsPointsInTime(!d1.getDomainIsPointsInTime()); assertFalse(d1.equals(d2)); d2.setDomainIsPointsInTime(!d2.getDomainIsPointsInTime()); assertEquals(d1, d2); d1 = new TimeTableXYDataset(TimeZone.getTimeZone("GMT")); d2 = new TimeTableXYDataset(TimeZone.getTimeZone( "America/Los_Angeles")); assertFalse(d1.equals(d2)); }