### Question:
XYImageAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { return this.image.hashCode(); } XYImageAnnotation(double x, double y, Image image);  XYImageAnnotation(double x, double y, Image image,
            RectangleAnchor anchor); double getX(); double getY(); Image getImage(); RectangleAnchor getImageAnchor(); @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() { Image image = getTestImage(); XYImageAnnotation a1 = new XYImageAnnotation(10.0, 20.0, image); XYImageAnnotation a2 = new XYImageAnnotation(10.0, 20.0, image); assertEquals(a1, a2); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); }