Code example for X500Principal

Methods: getName

0
        checkFind("ou=a, o=  a  b  ,cn=x", "o", "a  b"); 
        checkFind("o=\"  a  b  \" ,cn=x", "o", "  a  b  "); 
    } 
 
    private void checkFind(String dn, String attrType, String expected) {
        String actual = new DNParser(new X500Principal(dn)).find(attrType);
        assertEquals("dn:" + dn + "  attr:" + attrType, expected, actual);
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE