### Question:
XYShapeAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYShapeAnnotation(Shape shape);  XYShapeAnnotation(Shape shape, Stroke stroke, Paint outlinePaint);  XYShapeAnnotation(Shape shape, Stroke stroke, Paint outlinePaint,
                             Paint fillPaint); @Override void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea,
                     ValueAxis domainAxis, ValueAxis rangeAxis,
                     int rendererIndex,
                     PlotRenderingInfo info); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testCloning() throws CloneNotSupportedException { XYShapeAnnotation a1 = new XYShapeAnnotation( new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.2f), Color.RED, Color.BLUE); XYShapeAnnotation a2 = (XYShapeAnnotation) a1.clone(); assertNotSame(a1, a2); assertSame(a1.getClass(), a2.getClass()); assertEquals(a1, a2); }