### Question:
DialPointer extends AbstractDialLayer implements DialLayer, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DialPointer)) { return false; } DialPointer that = (DialPointer) obj; if (this.datasetIndex != that.datasetIndex) { return false; } if (this.radius != that.radius) { return false; } return super.equals(obj); } protected  DialPointer(); protected  DialPointer(int datasetIndex); int getDatasetIndex(); void setDatasetIndex(int index); double getRadius(); void setRadius(double radius); @Override boolean isClippedToWindow(); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testEquals() { DialPointer i1 = new DialPointer.Pin(1); DialPointer i2 = new DialPointer.Pin(1); assertEquals(i1, i2); i1 = new DialPointer.Pin(2); assertFalse(i1.equals(i2)); i2 = new DialPointer.Pin(2); assertEquals(i1, i2); i1.setVisible(false); assertFalse(i1.equals(i2)); i2.setVisible(false); assertEquals(i1, i2); }
@Test public void testEqualsPin() { DialPointer.Pin p1 = new DialPointer.Pin(); DialPointer.Pin p2 = new DialPointer.Pin(); assertEquals(p1, p2); p1.setPaint(Color.green); assertFalse(p1.equals(p2)); p2.setPaint(Color.green); assertEquals(p1, p2); BasicStroke s = new BasicStroke(4.4f); p1.setStroke(s); assertFalse(p1.equals(p2)); p2.setStroke(s); assertEquals(p1, p2); }
@Test public void testEqualsPointer() { DialPointer.Pointer p1 = new DialPointer.Pointer(); DialPointer.Pointer p2 = new DialPointer.Pointer(); assertEquals(p1, p2); p1.setFillPaint(Color.green); assertFalse(p1.equals(p2)); p2.setFillPaint(Color.green); assertEquals(p1, p2); p1.setOutlinePaint(Color.green); assertFalse(p1.equals(p2)); p2.setOutlinePaint(Color.green); assertEquals(p1, p2); }