### Question:
CategoricalDecision extends Decision { @Override public int hashCode() { return getFeatureNumber() ^ activeCategoryEncodings.hashCode(); } CategoricalDecision(int featureNumber,
                             BitSet activeCategoryEncodings,
                             boolean defaultDecision); @Override boolean getDefaultDecision(); BitSet getActiveCategoryEncodings(); @Override boolean isPositive(Example example); @Override FeatureType getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEqualsHashCode() { BitSet activeCategories = new BitSet(10); activeCategories.set(5); CategoricalDecision a = new CategoricalDecision(0, activeCategories, true); CategoricalDecision b = new CategoricalDecision(0, activeCategories, true); CategoricalDecision c = new CategoricalDecision(1, activeCategories, true); assertEquals(a, b); assertNotEquals(a, c); assertEquals(a.hashCode(), b.hashCode()); assertNotEquals(a.hashCode(), c.hashCode()); }