/**
* Confirm that the equals method can distinguish all the required fields.
*/
public void testEquals() {
TextTitle t = new TextTitle("Title");
XYTitleAnnotation a1 = new XYTitleAnnotation(1.0, 2.0, t);
XYTitleAnnotation a2 = new XYTitleAnnotation(1.0, 2.0, t);
assertTrue(a1.equals(a2));
a1 = new XYTitleAnnotation(1.1, 2.0, t);
assertFalse(a1.equals(a2));
a2 = new XYTitleAnnotation(1.1, 2.0, t);
assertTrue(a1.equals(a2));
a1 = new XYTitleAnnotation(1.1, 2.2, t);
assertFalse(a1.equals(a2));
a2 = new XYTitleAnnotation(1.1, 2.2, t);
assertTrue(a1.equals(a2));
TextTitle t2 = new TextTitle("Title 2");
a1 = new XYTitleAnnotation(1.1, 2.2, t2);
assertFalse(a1.equals(a2));
a2 = new XYTitleAnnotation(1.1, 2.2, t2);
assertTrue(a1.equals(a2));
}