/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
ComparableObjectItem item1 = new ComparableObjectItem(new Integer(1),
"XYZ");
ComparableObjectItem item2 = new ComparableObjectItem(new Integer(1),
"XYZ");
assertTrue(item1.equals(item2));
assertTrue(item2.equals(item1));
item1 = new ComparableObjectItem(new Integer(2), "XYZ");
assertFalse(item1.equals(item2));
item2 = new ComparableObjectItem(new Integer(2), "XYZ");
assertTrue(item1.equals(item2));
item1 = new ComparableObjectItem(new Integer(2), null);
assertFalse(item1.equals(item2));
item2 = new ComparableObjectItem(new Integer(2), null);
assertTrue(item1.equals(item2));
}