### Question:
Category extends AbstractEntity implements TypeWithName, Comparable<Category> { @Override public boolean deepEquals(Entity obj) { if(obj instanceof Category) { Category other = (Category) obj; return d_name.equals(other.d_name) && d_owner.deepEquals(other.d_owner); } return false; } Category(TreatmentCategorization owner);  Category(TreatmentCategorization owner, final String name); static Category createTrivial(Drug d); @Override String getName(); void setName(String name); @Override String getLabel(); @Override Set<? extends Entity> getDependencies(); @Override boolean equals(final Object o); @Override boolean deepEquals(Entity obj); @Override int hashCode(); @Override int compareTo(Category o); TreatmentCategorization getCategorization(); boolean isTrivial(); Drug getDrug(); boolean match(DrugTreatment t); boolean match(AbstractDose dose); String toString(); String getCriterionLabel();  }### Answer:
@Test public void testDeepEquals() { Category catA = new Category(d_catz1, "A"); Category catAdup = new Category(d_catz1, "A"); Category catB = new Category(d_catz1, "B"); Category catA2 = new Category(d_catz2, "A"); assertTrue(catA.deepEquals(catAdup)); assertTrue(catAdup.deepEquals(catA)); assertFalse(catA.deepEquals(catB)); assertFalse(catA.deepEquals(ExampleData.buildDrugFluoxetine())); assertFalse(catA.deepEquals(null)); assertFalse(catA.deepEquals(catA2)); d_catz2.setName(d_catz1.getName()); assertTrue(catA.deepEquals(catA2)); d_catz2.setDrug(new Drug(d_catz1.getDrug().getName(), "ANOTHERATC")); assertFalse(catA.deepEquals(catA2)); }