/**
* Some checks for the equals() method.
*/
public void testEquals() {
PaintMap m1 = new PaintMap();
PaintMap m2 = new PaintMap();
assertTrue(m1.equals(m1));
assertTrue(m1.equals(m2));
assertFalse(m1.equals(null));
assertFalse(m1.equals("ABC"));
m1.put("K1", Color.red);
assertFalse(m1.equals(m2));
m2.put("K1", Color.red);
assertTrue(m1.equals(m2));
m1.put("K2", new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f,
Color.yellow));
assertFalse(m1.equals(m2));
m2.put("K2", new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f,
Color.yellow));
assertTrue(m1.equals(m2));
m1.put("K2", null);
assertFalse(m1.equals(m2));
m2.put("K2", null);
assertTrue(m1.equals(m2));
}