### Question:
Epoch extends AbstractNamedEntity<Epoch> implements TypeWithNotes, TypeWithDuration { public Epoch rename(String newName) { Epoch clone = clone(); clone.d_name = newName; return clone; } 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 testRename() { Epoch epoch = new Epoch("Main phase", null); assertNotSame(epoch, epoch.rename("Main phase")); assertEquals(epoch, epoch.rename("Main phase")); assertEquals("New name", epoch.rename("New name").getName()); }