### Question:
MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof MatrixSeriesCollection) { MatrixSeriesCollection c = (MatrixSeriesCollection) obj; return ObjectUtilities.equal(this.seriesList, c.seriesList); } return false; } MatrixSeriesCollection();  MatrixSeriesCollection(MatrixSeries series); @Override int getItemCount(int seriesIndex); MatrixSeries getSeries(int seriesIndex); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int seriesIndex); @Override Number getX(int seriesIndex, int itemIndex); @Override Number getY(int seriesIndex, int itemIndex); @Override Number getZ(int seriesIndex, int itemIndex); void addSeries(MatrixSeries series); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); void removeAllSeries(); void removeSeries(MatrixSeries series); void removeSeries(int seriesIndex);  }### Answer:
@Test public void testEquals() { MatrixSeries s1 = new MatrixSeries("Series", 2, 3); s1.update(0, 0, 1.1); MatrixSeriesCollection c1 = new MatrixSeriesCollection(); c1.addSeries(s1); MatrixSeries s2 = new MatrixSeries("Series", 2, 3); s2.update(0, 0, 1.1); MatrixSeriesCollection c2 = new MatrixSeriesCollection(); c2.addSeries(s2); assertEquals(c1, c2); assertEquals(c2, c1); c1.addSeries(new MatrixSeries("Empty Series", 1, 1)); assertFalse(c1.equals(c2)); c2.addSeries(new MatrixSeries("Empty Series", 1, 1)); assertEquals(c1, c2); }