usersession.setUserStatus(admin,"foo",UserDataConstants.STATUS_NEW, false);
usersession.setUserStatus(admin,"foo",UserDataConstants.STATUS_NEW);
    public void test07DSAKey() throws Exception {        log.debug(">test07DSAKey()");        usersession.setUserStatus(admin,"foo",UserDataConstants.STATUS_NEW, false);        log.debug("Reset status of 'foo' to NEW");        try {            PKCS10RequestMessage p10 = new PKCS10RequestMessage(keytooldsa);            p10.setUsername("foo");            p10.setPassword("foo123");            IResponseMessage resp = remote.createCertificate(admin,                    p10, Class.forName("org.ejbca.core.protocol.X509ResponseMessage"));            X509Certificate cert = CertTools.getCertfromByteArray(resp.getResponseMessage());            log.info("cert with DN '"+cert.getSubjectDN().getName()+"' should not be issued?");        } catch (Exception e) {            // RSASignSession should throw an IllegalKeyException here.            assertTrue("Expected IllegalKeyException: " + e.toString(),                    e instanceof IllegalKeyException);        }        log.debug("<test07DSAKey()");    }