@Test(expected = IllegalArgumentException.class)
lic void testGetLdapRdnForKeyNoMatchingKeyThrowsException() throws Exception {

    DistinguishedName dn = new DistinguishedName("cn=john doe, ou=Some company, c=SE");
    dn.getLdapRdn("nosuchkey");
}