}
@Test
@Transactional
public void saveDerivedCalendar() {
BaseCalendar calendar = BaseCalendarTest.createBasicCalendar();
baseCalendarDAO.save(calendar);
BaseCalendar derivedCalendar = calendar.newDerivedCalendar();
derivedCalendar.setName("derived");
baseCalendarDAO.save(derivedCalendar);
try {
BaseCalendar savedCalendar = baseCalendarDAO.find(calendar.getId());
assertFalse(savedCalendar.isDerived());
BaseCalendar savedDerivedCalendar = baseCalendarDAO
.find(derivedCalendar.getId());
assertTrue(savedDerivedCalendar.isDerived());
} catch (InstanceNotFoundException e) {
fail("It should not throw an exception");
}