### Question:
XYShapeAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result = 193; result = 37 * result + this.shape.hashCode(); if (this.stroke != null) { result = 37 * result + this.stroke.hashCode(); } result = 37 * result + HashUtils.hashCodeForPaint( this.outlinePaint); result = 37 * result + HashUtils.hashCodeForPaint(this.fillPaint); return result; } 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 testHashCode() { 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 = new XYShapeAnnotation( new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.2f), Color.RED, Color.BLUE); assertEquals(a1, a2); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); }