"uniformResourceIdentifier=http:
"uniformResourceId=http:
    public void test09TestMultipleAltNames() throws Exception {        log.debug(">test09TestMultipleAltNames()");        // Create a good end entity profile (good enough), allowing multiple UPN names        rasession.removeEndEntityProfile(admin, "TESTMULALTNAME");        EndEntityProfile profile = new EndEntityProfile();        profile.addField(DnComponents.ORGANIZATION);        profile.addField(DnComponents.COUNTRY);        profile.addField(DnComponents.COMMONNAME);        profile.addField(DnComponents.UNIFORMRESOURCEID);        profile.addField(DnComponents.DNSNAME);        profile.addField(DnComponents.DNSNAME);        profile.addField(DnComponents.RFC822NAME);        profile.addField(DnComponents.IPADDRESS);        profile.addField(DnComponents.UPN);        profile.addField(DnComponents.UPN);        profile.setValue(EndEntityProfile.AVAILCAS,0, Integer.toString(SecConst.ALLCAS));        rasession.addEndEntityProfile(admin, "TESTMULALTNAME", profile);        int eeprofile = rasession.getEndEntityProfileId(admin, "TESTMULALTNAME");        try {            // Change a user that we know...            usersession.changeUser(admin, "foo", "foo123", "C=SE,O=AnaTom,CN=foo",                    "uniformResourceIdentifier=http://www.a.se/,upn=foo@a.se,upn=foo@b.se,rfc822name=tomas@a.se,dNSName=www.a.se,dNSName=www.b.se,iPAddress=10.1.1.1",                    "foo@anatom.se", false,                    eeprofile,                    SecConst.CERTPROFILE_FIXED_ENDUSER,                    SecConst.USER_ENDUSER,                    SecConst.TOKEN_SOFT_PEM, 0, UserDataConstants.STATUS_NEW, rsacaid);            log.debug("created user: foo, foo123, C=SE, O=AnaTom, CN=foo");        } catch (RemoteException re) {            assertTrue("User foo does not exist, or error changing user", false);        }         X509Certificate cert = (X509Certificate) remote.createCertificate(admin, "foo", "foo123", rsakeys.getPublic());        assertNotNull("Failed to create certificate", cert);//        FileOutputStream fos = new FileOutputStream("cert.crt");//        fos.write(cert.getEncoded());//        fos.close();        String altNames = CertTools.getSubjectAlternativeName(cert);        log.debug(altNames);        ArrayList list = CertTools.getPartsFromDN(altNames,CertTools.UPN);        assertEquals(2, list.size());        assertTrue(list.contains("foo@a.se"));        assertTrue(list.contains("foo@b.se"));        String name = CertTools.getPartFromDN(altNames,CertTools.URI);        assertEquals("http://www.a.se/", name);        name = CertTools.getPartFromDN(altNames,CertTools.EMAIL);        assertEquals("tomas@a.se", name);        list = CertTools.getPartsFromDN(altNames,CertTools.DNS);        assertEquals(2, list.size());        assertTrue(list.contains("www.a.se"));        assertTrue(list.contains("www.b.se"));        name = CertTools.getPartFromDN(altNames,CertTools.IPADDR);        assertEquals("10.1.1.1", name);        // Clean up        rasession.removeEndEntityProfile(admin, "TESTMULALTNAME");        log.debug("<test09TestMultipleAltNames()");            }