### Question:
DefaultBoxAndWhiskerXYDataset extends AbstractXYDataset implements BoxAndWhiskerXYDataset, RangeInfo { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultBoxAndWhiskerXYDataset)) { return false; } DefaultBoxAndWhiskerXYDataset that = (DefaultBoxAndWhiskerXYDataset) obj; if (!ObjectUtils.equal(this.seriesKey, that.seriesKey)) { return false; } if (!this.dates.equals(that.dates)) { return false; } if (!this.items.equals(that.items)) { return false; } return true; } DefaultBoxAndWhiskerXYDataset(Comparable seriesKey); @Override double getOutlierCoefficient(); void setOutlierCoefficient(double outlierCoefficient); @Override double getFaroutCoefficient(); void setFaroutCoefficient(double faroutCoefficient); @Override int getSeriesCount(); @Override int getItemCount(int series); void add(Date date, BoxAndWhiskerItem item); @Override Comparable getSeriesKey(int i); BoxAndWhiskerItem getItem(int series, int item); @Override Number getX(int series, int item); Date getXDate(int series, int item); @Override Number getY(int series, int item); @Override Number getMeanValue(int series, int item); @Override Number getMedianValue(int series, int item); @Override Number getQ1Value(int series, int item); @Override Number getQ3Value(int series, int item); @Override Number getMinRegularValue(int series, int item); @Override Number getMaxRegularValue(int series, int item); @Override Number getMinOutlier(int series, int item); @Override Number getMaxOutlier(int series, int item); @Override List<Number> getOutliers(int series, int item); @Override double getRangeLowerBound(boolean includeInterval); @Override double getRangeUpperBound(boolean includeInterval); @Override Range getRangeBounds(boolean includeInterval); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testEquals() { DefaultBoxAndWhiskerXYDataset d1 = new DefaultBoxAndWhiskerXYDataset( "Series"); DefaultBoxAndWhiskerXYDataset d2 = new DefaultBoxAndWhiskerXYDataset( "Series"); assertEquals(d1, d2); d1.add(new Date(1L), new BoxAndWhiskerItem(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, new ArrayList())); assertFalse(d1.equals(d2)); d2.add(new Date(1L), new BoxAndWhiskerItem(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, new ArrayList())); assertEquals(d1, d2); }