/**
* Confirm that the equals() method can distinguish all the required fields.
*/
public void testEquals() {
BlockBorder b1 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0,
4.0), Color.red);
BlockBorder b2 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0,
4.0), Color.red);
assertTrue(b1.equals(b2));
assertTrue(b2.equals(b2));
// insets
b1 = new BlockBorder(new RectangleInsets(UnitType.RELATIVE, 1.0, 2.0,
3.0, 4.0), Color.red);
assertFalse(b1.equals(b2));
b2 = new BlockBorder(new RectangleInsets(UnitType.RELATIVE, 1.0, 2.0,
3.0, 4.0), Color.red);
assertTrue(b1.equals(b2));
// paint
b1 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0, 4.0),
Color.blue);
assertFalse(b1.equals(b2));
b2 = new BlockBorder(new RectangleInsets(1.0, 2.0, 3.0, 4.0),
Color.blue);
assertTrue(b1.equals(b2));
}