### Question:
Drug extends AbstractNamedEntity<Drug> implements Comparable<Drug> { @Override public boolean deepEquals(Entity other) { if(!equals(other)) { return false; } Drug d = (Drug) other; return (getAtcCode().equals(d.getAtcCode())); } Drug(String name, String atcCode); String getAtcCode(); void setAtcCode(String atcCode); @Override String toString(); @Override boolean equals(Object o); @Override boolean deepEquals(Entity other); @Override Set<Entity> getDependencies(); void setName(String name); static final String PROPERTY_ATCCODE; }### Answer:
@Test public void testDeepEqual() { Drug d1 = new Drug("Paroxetine", "atc"); Drug d2 = new Drug("Paroxetine", "atasdfc"); Drug d3 = new Drug("Fluoxetine", "atasdfc"); assertTrue(d1.deepEquals(d1)); assertFalse(d1.deepEquals(d2)); assertFalse(d2.deepEquals(d3)); }