assertTrue("wrong status", data.getStatus() == UserDataLocal.STATUS_GENERATED);
assertTrue("wrong status", data.getStatus() == UserDataConstants.STATUS_GENERATED);
    public void test03LookupChangedUser() throws Exception {        log.debug(">test03LookupChangedUser()");        UserDataVO data = usersession.findUser(admin,username);        log.debug("found by key! =" + data);        log.debug("username=" + data.getUsername());        assertTrue("wrong username", data.getUsername().equals(username));        log.debug("subject=" + data.getDN());        assertTrue("wrong DN (cn)", data.getDN().indexOf(username) != -1);        assertTrue("wrong DN (ou)", data.getDN().indexOf("Engineering") != -1);        log.debug("email=" + data.getEmail());        assertNotNull("Email should not be null now.", data.getEmail());        assertTrue("wrong email", data.getEmail().equals(username + "@anatom.se"));        log.debug("status=" + data.getStatus());        assertTrue("wrong status", data.getStatus() == UserDataLocal.STATUS_GENERATED);        log.debug("type=" + data.getType());        assertTrue("wrong type", data.getType() == SecConst.USER_ENDUSER);        assertTrue("wrong pwd foo123", usersession.verifyPassword(admin,username,"foo123"));        assertTrue("wrong pwd (" + pwd + " works)" + pwd, usersession.verifyPassword(admin,username,pwd) == false);        // Use clear text pwd instead, new email, reverse DN again        usersession.changeUser(admin,username,"foo234","C=SE,O=AnaTom,CN="+username,null,username+"@anatom.nu",true,SecConst.EMPTY_ENDENTITYPROFILE,SecConst.CERTPROFILE_FIXED_ENDUSER,SecConst.USER_ENDUSER,SecConst.TOKEN_SOFT_PEM,0,UserDataLocal.STATUS_GENERATED,caid);        log.debug("<test03LookupChangedUser()");    }