}
}
public void testCreateAndUpdateAndRemoveCode() throws Exception {
log.warn("Creating a code");
Code code = new Code("code", "description");
dao.saveCode(code);
Integer id = code.getId();
code = dao.getCode(id);
assertEquals(code.getName(), "code");
assertEquals(code.getDescription(), "description");
log.warn("Code created: " + code);
code.setName("newcode");
code.setDescription("other description");
dao.saveCode(code);
log.warn("Code updated");
code = dao.getCode(id);
assertEquals(code.getName(), "newcode");
assertEquals(code.getDescription(), "other description");
log.warn("Code: " + code);
dao.removeCode(code);
}