}
}
public void testCreateAndUpdateAndRemoveDetail() throws Exception {
log.warn("Creating a detail");
Detail detail = new Detail("detail", "description");
dao.saveDetail(detail);
Integer id = detail.getId();
detail = dao.getDetail(id);
assertEquals(detail.getName(), "detail");
assertEquals(detail.getDescription(), "description");
log.warn("Detail created: " + detail);
detail.setName("newdetail");
detail.setDescription("other description");
dao.saveDetail(detail);
log.warn("Detail updated");
detail = dao.getDetail(id);
assertEquals(detail.getName(), "newdetail");
assertEquals(detail.getDescription(), "other description");
log.warn("Detail: " + detail);
dao.removeDetail(detail);
log.warn("Detail removed");
}