### Question:
XYDataItem implements Cloneable, Comparable<XYDataItem>, 
        Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYDataItem)) { return false; } XYDataItem that = (XYDataItem) obj; if (!this.x.equals(that.x)) { return false; } if (!ObjectUtils.equal(this.y, that.y)) { return false; } return true; } XYDataItem(Number x, Number y);  XYDataItem(double x, double y); Number getX(); double getXValue(); Number getY(); double getYValue(); void setY(double y); void setY(Number y); @Override int compareTo(XYDataItem dataItem); @Override Object clone(); XYDataItem copy(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() { XYDataItem i1 = new XYDataItem(1.0, 1.1); XYDataItem i2 = new XYDataItem(1.0, 1.1); assertEquals(i1, i2); assertEquals(i2, i1); i1.setY(new Double(9.9)); assertFalse(i1.equals(i2)); i2.setY(new Double(9.9)); assertEquals(i1, i2); }