assertNotNull("Misslyckades skapa cert", cert);
assertNotNull("Failed to create certificate", cert);
    public void test03TestBCPKCS10() throws Exception {        cat.debug(">test03TestBCPKCS10()");        UserDataPK pk = new UserDataPK();        pk.username = "foo";        UserData data = userhome.findByPrimaryKey(pk);        data.setStatus(UserData.STATUS_NEW);        cat.debug("Reset status of 'foo' to NEW");        // Create certificate request        PKCS10CertificationRequest req = new PKCS10CertificationRequest(            "SHA1WithRSA", CertTools.stringToBcX509Name("C=SE, O=AnaTom, CN=foo"), keys.getPublic(), null, keys.getPrivate());        ByteArrayOutputStream bOut = new ByteArrayOutputStream ();        DEROutputStream dOut = new DEROutputStream(bOut);        dOut.writeObject(req);        dOut.close();        ByteArrayInputStream bIn = new ByteArrayInputStream(bOut.toByteArray());        DERInputStream dIn = new DERInputStream(bIn);        PKCS10CertificationRequest req2 = new PKCS10CertificationRequest((DERConstructedSequence)dIn.readObject());        boolean verify = req2.verify();        System.out.println("Verify returned " + verify);        if (verify == false) {            System.out.println("Aborting!");            return;        }        cat.debug("CertificationRequest generated succefully.");        byte[] bcp10 = bOut.toByteArray();        X509Certificate cert = (X509Certificate)remote.createCertificate("foo", "foo123", bcp10);        assertNotNull("Misslyckades skapa cert", cert);        System.out.println("Cert="+cert.toString());       cat.debug("<test03TestBCPKCS10()");    }