LDAPUserInfoImpl extends AbstractLDAPUserGroupInfo implements UserInfo { @Override public String getEntityForEmail(String email) { String context = getConfigProperty(USER_CTX); String filter = getConfigProperty(EMAIL_FILTER); String attributeId = getConfigProperty(USER_ATTR_ID, DEFAULT_USER_ATTR_ID); LdapSearcher searcher = ldapSearcher.search(context, filter, email); if (searcher.getSearchResults().isEmpty()) { return null; } if (isEntityIdDn()) { return searcher.getSingleSearchResult().getNameInNamespace(); } return searcher.getSingleAttributeResult(attributeId); } LDAPUserInfoImpl(boolean activate);  LDAPUserInfoImpl(Properties config); @Override String getDisplayName(OrganizationalEntity entity); @Override Iterator<OrganizationalEntity> getMembersForGroup(Group group); @Override boolean hasEmail(Group group); @Override String getEmailForEntity(OrganizationalEntity entity); @Override String getLanguageForEntity(OrganizationalEntity entity); @Override String getEntityForEmail(String email); static final String USER_CTX; static final String ROLE_CTX; static final String USER_FILTER; static final String ROLE_FILTER; static final String ROLE_MEMBERS_FILTER; static final String EMAIL_FILTER; static final String EMAIL_ATTR_ID; static final String NAME_ATTR_ID; static final String LANG_ATTR_ID; static final String MEMBER_ATTR_ID; static final String USER_ATTR_ID; static final String ROLE_ATTR_ID; static final String IS_ENTITY_ID_DN; static final String SEARCH_SCOPE; }
@Test public void testGetEntityForEmail() { testGetEntityForEmail(JOHN_EMAIL, JOHN.getId(), false); }