### Question:
Epoch extends AbstractNamedEntity<Epoch> implements TypeWithNotes, TypeWithDuration { @Override public boolean equals(Object obj) { if (obj instanceof Epoch) { return super.equals(obj); } return false; } Epoch(String name, Duration duration); ObservableList<Note> getNotes(); @Override Set<? extends Entity> getDependencies(); void setDuration(Duration duration); Duration getDuration(); @Override boolean equals(Object obj); boolean deepEquals(Entity obj); @Override String toString(); Epoch rename(String newName); static final String PROPERTY_DURATION; }### Answer:
@Test public void testEquals() throws DatatypeConfigurationException { Epoch e = new Epoch("Main phase", DatatypeFactory.newInstance().newDuration("P42D")); Epoch e2 = new Epoch("Main phase", null); Epoch e3 = new Epoch("Randomization", null); assertEquals(e, e2); JUnitUtil.assertNotEquals(e2, e3); assertEquals(e.hashCode(), e2.hashCode()); d_null.hashCode(); assertTrue(e.deepEquals(d_mainphase)); assertFalse(e2.deepEquals(d_randomization)); assertFalse(d_null.deepEquals(d_mainphase)); assertTrue(e3.deepEquals(d_randomization)); e3.getNotes().add(new Note()); assertFalse(e3.deepEquals(d_randomization)); }