### Question:
BaseEntity { @PrePersist public void prePersist() { DateTime now = DateTime.now(); this.creationTime = now; this.modificationTime = now; }  abstract ID getId(); DateTime getCreationTime(); DateTime getModificationTime(); long getVersion(); @PrePersist void prePersist(); @PreUpdate void preUpdate();  }### Answer:
@Test public void prePersist_ShouldSetCreationAndModificationTime() { TestEntity entity = new TestEntity(); entity.prePersist(); assertThat(entity) .creationTimeIsSet() .modificationTimeIsSet() .creationTimeAndModificationTimeAreEqual(); }