### Question:
Drug extends AbstractNamedEntity<Drug> implements Comparable<Drug> { @Override public boolean equals(Object o) { if (o instanceof Drug) { return super.equals(o); } return false; } 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 testEquals() { Drug d1 = new Drug("Paroxetine", "atc"); Drug d2 = new Drug("Paroxetine", "atasdfc"); Drug d3 = new Drug("Fluoxetine", "atcasdfasdf"); assertTrue(d1.equals(d2)); assertFalse(d1.equals(d3)); }