@Test
public void testComplexName() {

    Map<String, Object> settings = getSettings();
    settings.put("nameMapping", "${personalTitle}. ${givenName} ${surname}");
    ldap = newRealm(settings);
    Account userOne = ldap.authenticate("UserOne", "userOnePassword");
    assertNotNull(userOne);
    assertEquals("Mr. User One", userOne.getName());
}