### Question:
CategoryTick extends Tick { @Override public int hashCode() { int result = 41; result = 37 * result + this.category.hashCode(); result = 37 * result + this.label.hashCode(); result = 37 * result + this.labelAnchor.hashCode(); return result; } CategoryTick(Comparable category,
                        TextBlock label,
                        TextBlockAnchor labelAnchor,
                        TextAnchor rotationAnchor,
                        double angle); Comparable getCategory(); TextBlock getLabel(); TextBlockAnchor getLabelAnchor(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testHashCode() { Comparable c1 = "C1"; TextBlock tb1 = new TextBlock(); tb1.addLine(new TextLine("Block 1")); tb1.addLine(new TextLine("Block 2")); TextBlockAnchor tba1 = TextBlockAnchor.CENTER; TextAnchor ta1 = TextAnchor.CENTER; CategoryTick t1 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f); CategoryTick t2 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f); assertEquals(t1, t2); int h1 = t1.hashCode(); int h2 = t2.hashCode(); assertEquals(h1, h2); }