### Question:
Unit extends AbstractNamedEntity<Unit> { @Override public boolean deepEquals(Entity other) { if (!super.deepEquals(other)) { return false; } Unit o = (Unit) other; return EqualsUtil.equal(d_symbol, o.d_symbol); } Unit(String name, String symbol); String getSymbol(); void setSymbol(String symbol); @Override Set<? extends Entity> getDependencies(); @Override boolean deepEquals(Entity other); @Override String toString(); void setName(String name); static final String PROPERTY_SYMBOL; }### Answer:
@Test public void testEqualities() { assertFalse(d_gram.equals(d_liter)); assertFalse(d_gram.deepEquals(d_liter)); Unit badGram = new Unit("gram", "bg"); assertTrue(d_gram.equals(badGram)); assertEquals(d_gram.hashCode(), badGram.hashCode()); assertFalse(d_gram.deepEquals(badGram)); }