LdapUserMapping { public String getBaseDn() { return baseDn; } LdapUserMapping(Settings settings, String settingsPrefix); LdapSearch createSearch(LdapContextFactory contextFactory, String username); String getBaseDn(); String getRequest(); String getRealNameAttribute(); String getEmailAttribute(); @Override String toString();  }
@Test public void realm() { Settings settings = new Settings() .setProperty("ldap.realm", "example.org") .setProperty("ldap.userObjectClass", "user") .setProperty("ldap.loginAttribute", "sAMAccountName"); LdapUserMapping userMapping = new LdapUserMapping(settings, "ldap"); assertThat(userMapping.getBaseDn()).isEqualTo("dc=example,dc=org"); }