UserRole testRole = new UserRole();
testRole.setAuthority("TEST");
user.setRole(testRole);
UserHome fixture = getUserHome();
fixture.store(testRole);
fixture.store(user);
// force commit immeidately, important:
setComplete();
endTransaction();
logger.info("user created: " + user.getUsername() + "id = " + user.getId());
// 2. verify
String sqlStr = "select count(*) from public.user where user_id=" + user.getId();
int count = jdbcTemplate.queryForInt(sqlStr);
assertTrue(count == 1);
// 3. delete
// fixture.delete(testRole);
fixture.delete(user);
setComplete();
// 4. verify delte:
int countVerify = jdbcTemplate.queryForInt(sqlStr);
assertTrue(countVerify == 0);