usersession.changeUser(admin,username,"foo123","C=SE,O=AnaTom,OU=Engineering, CN="+username,null,username+"@anatom.se",false,SecConst.EMPTY_ENDENTITYPROFILE,SecConst.CERTPROFILE_FIXED_ENDUSER,SecConst.USER_ENDUSER,SecConst.TOKEN_SOFT_PEM,0,UserDataLocal.STATUS_GENERATED,caid);
usersession.changeUser(admin,username,"foo123","C=SE,O=AnaTom,OU=Engineering, CN="+username,null,username+"@anatom.se",false,SecConst.EMPTY_ENDENTITYPROFILE,SecConst.CERTPROFILE_FIXED_ENDUSER,SecConst.USER_ENDUSER,SecConst.TOKEN_SOFT_PEM,0,UserDataConstants.STATUS_GENERATED,caid);
    public void test02LookupAndChangeUser() throws Exception {        log.debug(">test02LookupAndChangeUser()");        log.debug("username=" + username);        UserDataVO data2 = usersession.findUser(admin,username);        log.debug("found by key! =" + data2);        log.debug("username=" + data2.getUsername());        assertTrue("wrong username", data2.getUsername().equals(username));        log.debug("subject=" + data2.getDN());        assertTrue("wrong DN", data2.getDN().indexOf(username) != -1);        log.debug("email=" + data2.getEmail());        assertNull("wrong email", data2.getEmail());        log.debug("status=" + data2.getStatus());        assertTrue("wrong status", data2.getStatus() == UserDataLocal.STATUS_NEW);        log.debug("type=" + data2.getType());        assertTrue("wrong type", data2.getType() == SecConst.USER_INVALID);        assertTrue("wrong pwd (foo123 works)", usersession.verifyPassword(admin,username,"foo123") == false);        assertTrue("wrong pwd " + pwd, usersession.verifyPassword(admin,username,pwd));        // Change DN        usersession.changeUser(admin,username,"foo123","C=SE,O=AnaTom,OU=Engineering, CN="+username,null,username+"@anatom.se",false,SecConst.EMPTY_ENDENTITYPROFILE,SecConst.CERTPROFILE_FIXED_ENDUSER,SecConst.USER_ENDUSER,SecConst.TOKEN_SOFT_PEM,0,UserDataLocal.STATUS_GENERATED,caid);        log.debug("Changed it");        log.debug("<test02LookupAndChangeUser()");    }