usersession.setUserStatus(admin,"swede",UserDataLocal.STATUS_NEW);
usersession.setUserStatus(admin,"swede",UserDataConstants.STATUS_NEW);
    public void test08SwedeChars() throws Exception {        log.debug(">test08SwedeChars()");        // Make user that we know...        boolean userExists = false;        try {            usersession.addUser(admin,"swede","foo123","C=SE, O=, CN=",null,"swede@anatom.se",false,SecConst.EMPTY_ENDENTITYPROFILE,SecConst.CERTPROFILE_FIXED_ENDUSER,SecConst.USER_ENDUSER,SecConst.TOKEN_SOFT_PEM,0,caid);            log.debug("created user: swede, foo123, C=SE, O=, CN=");        } catch (RemoteException re) {            if (re.detail instanceof DuplicateKeyException) {                userExists = true;            }        } catch (DuplicateKeyException dke) {            userExists = true;        }        if (userExists) {            log.debug("user swede already exists.");            usersession.setUserStatus(admin,"swede",UserDataLocal.STATUS_NEW);            log.debug("Reset status to NEW");        }        keys = genKeys();        // user that we know exists...        X509Certificate cert = (X509Certificate) remote.createCertificate(admin, "swede", "foo123", keys.getPublic());        assertNotNull("Failed to create certificate", cert);        log.debug("Cert=" + cert.toString());        assertEquals("Wrong DN med swedechars", CertTools.getSubjectDN(cert),                CertTools.stringToBCDNString("C=SE, O=, CN="));        //FileOutputStream fos = new FileOutputStream("swedecert.crt");        //fos.write(cert.getEncoded());        //fos.close();        log.debug("<test08SwedeChars()");    }