### Question:
TextAnnotation extends AbstractAnnotation implements Serializable { @Override public int hashCode() { int result = 193; result = 37 * result + this.font.hashCode(); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.rotationAnchor.hashCode(); long temp = Double.doubleToLongBits(this.rotationAngle); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.text.hashCode(); result = 37 * result + this.textAnchor.hashCode(); return result; } protected  TextAnnotation(String text); String getText(); void setText(String text); Font getFont(); void setFont(Font font); Paint getPaint(); void setPaint(Paint paint); TextAnchor getTextAnchor(); void setTextAnchor(TextAnchor anchor); TextAnchor getRotationAnchor(); void setRotationAnchor(TextAnchor anchor); double getRotationAngle(); void setRotationAngle(double angle); @Override boolean equals(Object obj); @Override int hashCode(); static final Font DEFAULT_FONT; static final Paint DEFAULT_PAINT; static final TextAnchor DEFAULT_TEXT_ANCHOR; static final TextAnchor DEFAULT_ROTATION_ANCHOR; static final double DEFAULT_ROTATION_ANGLE; }### Answer:
@Test public void testHashCode() { TextAnnotation a1 = new CategoryTextAnnotation("Test", "Category", 1.0); TextAnnotation a2 = new CategoryTextAnnotation("Test", "Category", 1.0); assertEquals(a1, a2); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); }