}
@Test
@Transactional
public void canSaveMilestone() {
TaskMilestone milestone = createValidTaskMilestone();
taskElementDAO.save(milestone);
flushAndEvict(milestone);
TaskElement fromDB;
try {
fromDB = taskElementDAO.find(milestone.getId());
} catch (InstanceNotFoundException e) {
throw new RuntimeException(e);
}
assertThat(fromDB.getId(), equalTo(milestone.getId()));
assertThat(fromDB, instanceOf(TaskMilestone.class));
}