### Question:
ComparableObjectSeries extends Series implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ComparableObjectSeries)) { return false; } if (!super.equals(obj)) { return false; } ComparableObjectSeries that = (ComparableObjectSeries) obj; if (this.maximumItemCount != that.maximumItemCount) { return false; } if (this.autoSort != that.autoSort) { return false; } if (this.allowDuplicateXValues != that.allowDuplicateXValues) { return false; } if (!ObjectUtilities.equal(this.data, that.data)) { return false; } return true; } ComparableObjectSeries(Comparable key);  ComparableObjectSeries(Comparable key, boolean autoSort,
            boolean allowDuplicateXValues); boolean getAutoSort(); boolean getAllowDuplicateXValues(); @Override int getItemCount(); int getMaximumItemCount(); void setMaximumItemCount(int maximum); int indexOf(Comparable x); void clear(); ComparableObjectItem remove(Comparable x); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testEquals() { MyComparableObjectSeries s1 = new MyComparableObjectSeries("A"); MyComparableObjectSeries s2 = new MyComparableObjectSeries("A"); assertEquals(s1, s2); assertEquals(s2, s1); s1 = new MyComparableObjectSeries("B"); assertFalse(s1.equals(s2)); s2 = new MyComparableObjectSeries("B"); assertEquals(s1, s2); s1 = new MyComparableObjectSeries("B", false, true); assertFalse(s1.equals(s2)); s2 = new MyComparableObjectSeries("B", false, true); assertEquals(s1, s2); s1 = new MyComparableObjectSeries("B", false, false); assertFalse(s1.equals(s2)); s2 = new MyComparableObjectSeries("B", false, false); assertEquals(s1, s2); s1.add(new Integer(1), "ABC"); assertFalse(s1.equals(s2)); s2.add(new Integer(1), "ABC"); assertEquals(s1, s2); s1.add(new Integer(0), "DEF"); assertFalse(s1.equals(s2)); s2.add(new Integer(0), "DEF"); assertEquals(s1, s2); s1.remove(new Integer(1)); assertFalse(s1.equals(s2)); s2.remove(new Integer(1)); assertEquals(s1, s2); }