### Question:
TreatmentCategorization extends AbstractEntity implements Comparable<TreatmentCategorization>, TypeWithName { @Override public boolean deepEquals(Entity obj) { if (equals(obj)) { TreatmentCategorization other = (TreatmentCategorization) obj; return d_categories.equals(other.d_categories) && d_drug.deepEquals(other.d_drug) && d_decisionTree.equivalent(other.d_decisionTree); } return false; } private  TreatmentCategorization(final String name, final Drug drug, final DoseUnit unit, boolean withDefault); static TreatmentCategorization createBare(String name, Drug drug, DoseUnit unit); static TreatmentCategorization createDefault(String name, Drug drug, DoseUnit unit); static TreatmentCategorization createDefault(); static TreatmentCategorization createTrivial(Drug drug); boolean isTrivial(); @Override String getName(); void setName(final String name); Drug getDrug(); void setDrug(final Drug drug); DoseUnit getDoseUnit(); void addCategory(final Category categoryNode); ObservableList<Category> getCategories(); Category getCategory(final AbstractDose dose); @Override String getLabel(); @Override String toString(); @Override Set<? extends Entity> getDependencies(); DecisionTree getDecisionTree(); DecisionTreeNode getRootNode(); Pair<RangeEdge> splitRange(final ChoiceNode parent, final double value, final boolean lowerRangeOpen); Pair<RangeEdge> splitRange(final RangeEdge edge, final double value, final boolean lowerRangeOpen); @Override int compareTo(TreatmentCategorization o); @Override boolean equals(Object obj); @Override boolean deepEquals(Entity obj); @Override int hashCode(); static final ChoiceNode ROOT_NODE; static final String PROPERTY_DOSE_UNIT; static final String PROPERTY_DRUG; static final String PROPERTY_CATEGORIES; }### Answer:
@Test public void testDeepEquals() { TreatmentCategorization catz1 = TreatmentCategorization.createTrivial(ExampleData.buildDrugFluoxetine()); TreatmentCategorization catz2 = TreatmentCategorization.createTrivial(ExampleData.buildDrugFluoxetine()); assertTrue(catz1.deepEquals(catz2)); catz1.getCategories().get(0).setName("Include"); assertFalse(catz1.deepEquals(catz2)); catz2.getCategories().get(0).setName("Include"); assertTrue(catz1.deepEquals(catz2)); catz1.setName("CATZ"); assertFalse(catz1.deepEquals(catz2)); catz2.setName("CATZ"); assertTrue(catz1.deepEquals(catz2)); catz1.setDrug(new Drug(catz1.getDrug().getName(), "FAKEATCCODE")); assertFalse(catz1.deepEquals(catz2)); }