}
}
public void testCreateAndUpdateAndRemoveType() throws Exception {
log.warn("Creating a type");
Type type = new Type("type", "description");
dao.saveType(type);
Integer id = type.getId();
type = dao.getType(id);
assertEquals(type.getName(), "type");
assertEquals(type.getDescription(), "description");
log.warn("Type created: " + type);
type.setName("newtype");
type.setDescription("other description");
dao.saveType(type);
log.warn("Type updated");
type = dao.getType(id);
assertEquals(type.getName(), "newtype");
assertEquals(type.getDescription(), "other description");
log.warn("Type: " + type);
dao.removeType(type);
log.warn("Type removed");
}