dn = "uniformResourceId=http: extractor = new DNFieldExtractor(dn, DNFieldExtractor.TYPE_SUBJECTALTNAME); illegal = extractor.isIllegal(); assertFalse(illegal); other = extractor.existsOther(); assertFalse(other);
    public void test01CheckAltNameFields() throws Exception {    	String dn = "DnsName=foo.bar.se,rfc822Name=foo@bar.se";    	DNFieldExtractor extractor = new DNFieldExtractor(dn, DNFieldExtractor.TYPE_SUBJECTALTNAME);    	HashMap i = extractor.getNumberOfFields();    	assertEquals(11,i.size());    	// Just check so we don't get any exceptions from this        for(int j = DNFieldExtractor.SUBJECTALTERNATIVENAMEBOUNDRARY; j < DNFieldExtractor.SUBJECTDIRATTRBOUNDRARY; j++){        	int num = j;        	//System.out.println("Getting "+num);        	int nof = ((Integer)i.get(Integer.valueOf(num))).intValue();        	//System.out.println("Got "+nof);        }        String dns = extractor.getField(DNFieldExtractor.DNSNAME, 0);    	assertEquals("foo.bar.se", dns);    	boolean illegal = extractor.isIllegal();    	assertFalse(illegal);    	boolean other = extractor.existsOther();    	assertFalse(other);    	String email= extractor.getField(DNFieldExtractor.RFC822NAME, 0);    	assertEquals("foo@bar.se", email);    	    	int num = extractor.getNumberOfFields(DNFieldExtractor.RFC822NAME);    	assertEquals(1, num);    }