}
}
public void testCreateAndUpdateAndRemoveRole() throws Exception {
log.warn("Creating a role");
Role role = new Role("role", "description");
dao.saveRole(role);
Integer id = role.getId();
role = dao.getRole(id);
assertEquals(role.getName(), "role");
assertEquals(role.getDescription(), "description");
log.warn("Role created: " + role);
role.setName("newrole");
role.setDescription("other description");
dao.saveRole(role);
log.warn("Role updated");
role = dao.getRole(id);
assertEquals(role.getName(), "newrole");
assertEquals(role.getDescription(), "other description");
log.warn("Role: " + role);
dao.removeRole(role);
log.warn("Role removed");
}