### Question:
DefaultIntervalXYDataset extends AbstractIntervalXYDataset implements PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultIntervalXYDataset)) { return false; } DefaultIntervalXYDataset that = (DefaultIntervalXYDataset) obj; if (!this.seriesKeys.equals(that.seriesKeys)) { return false; } for (int i = 0; i < this.seriesList.size(); i++) { double[][] d1 = this.seriesList.get(i); double[][] d2 = that.seriesList.get(i); double[] d1x = d1[0]; double[] d2x = d2[0]; if (!Arrays.equals(d1x, d2x)) { return false; } double[] d1xs = d1[1]; double[] d2xs = d2[1]; if (!Arrays.equals(d1xs, d2xs)) { return false; } double[] d1xe = d1[2]; double[] d2xe = d2[2]; if (!Arrays.equals(d1xe, d2xe)) { return false; } double[] d1y = d1[3]; double[] d2y = d2[3]; if (!Arrays.equals(d1y, d2y)) { return false; } double[] d1ys = d1[4]; double[] d2ys = d2[4]; if (!Arrays.equals(d1ys, d2ys)) { return false; } double[] d1ye = d1[5]; double[] d2ye = d2[5]; if (!Arrays.equals(d1ye, d2ye)) { return false; } } return true; } DefaultIntervalXYDataset(); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override double getYValue(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getEndX(int series, int item); @Override Number getEndY(int series, int item); @Override Number getStartX(int series, int item); @Override Number getStartY(int series, int item); @Override Number getX(int series, int item); @Override Number getY(int series, int item); void addSeries(Comparable seriesKey, double[][] data); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testEquals() { DefaultIntervalXYDataset d1 = new DefaultIntervalXYDataset(); DefaultIntervalXYDataset d2 = new DefaultIntervalXYDataset(); assertEquals(d1, d2); assertEquals(d2, d1); d1 = createSampleDataset1(); assertFalse(d1.equals(d2)); d2 = createSampleDataset1(); assertEquals(d1, d2); }