@Test
public void testBindWithUser() {

    Map<String, Object> settings = getSettings();
    settings.put("bindPattern", "CN=${username},OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain");
    settings.put("username", "");
    settings.put("password", "");
    ldap = newRealm(settings);
    Account userOne = ldap.authenticate("UserOne", "userOnePassword");
    assertNotNull(userOne);
    Account userOneFailedAuth = ldap.authenticate("UserOne", "userTwoPassword");
    assertNull(userOneFailedAuth);
}