### Question:
XYPointerAnnotation extends XYTextAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result = super.hashCode(); long temp = Double.doubleToLongBits(this.angle); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.tipRadius); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.baseRadius); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.arrowLength); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.arrowWidth); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = result * 37 + HashUtils.hashCodeForPaint(this.arrowPaint); result = result * 37 + this.arrowStroke.hashCode(); temp = Double.doubleToLongBits(this.labelOffset); result = 37 * result + (int) (temp ^ (temp >>> 32)); return result; } XYPointerAnnotation(String label, double x, double y, double angle); double getAngle(); void setAngle(double angle); double getTipRadius(); void setTipRadius(double radius); double getBaseRadius(); void setBaseRadius(double radius); double getLabelOffset(); void setLabelOffset(double offset); double getArrowLength(); void setArrowLength(double length); double getArrowWidth(); void setArrowWidth(double width); Stroke getArrowStroke(); void setArrowStroke(Stroke stroke); Paint getArrowPaint(); void setArrowPaint(Paint paint); @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(); static final double DEFAULT_TIP_RADIUS; static final double DEFAULT_BASE_RADIUS; static final double DEFAULT_LABEL_OFFSET; static final double DEFAULT_ARROW_LENGTH; static final double DEFAULT_ARROW_WIDTH; }### Answer:
@Test public void testHashCode() { XYPointerAnnotation a1 = new XYPointerAnnotation("Label", 10.0, 20.0, Math.PI); XYPointerAnnotation a2 = new XYPointerAnnotation("Label", 10.0, 20.0, Math.PI); assertEquals(a1, a2); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); }