user = (User) mgr.saveUser(user);
user = mgr.saveUser(user);
    public void testAddAndRemoveUser() throws Exception {        user = new User();        // call populate method in super class to populate test data        // from a properties file matching this class name        user = (User) populate(user);        user.addRole(Constants.USER_ROLE);        user = (User) mgr.saveUser(user);        assertTrue(user.getUsername().equals("john"));        assertTrue(user.getRoles().size() == 1);        if (log.isDebugEnabled()) {            log.debug("removing user...");        }        mgr.removeUser(user.getUsername());        try {            user = (User) mgr.getUser("john");            fail("Expected 'Exception' not thrown");        } catch (Exception e) {            if (log.isDebugEnabled()) {                log.debug(e);            }            assertTrue(e != null);        }    }