@Test
public void testGetSingleSearchResult() throws NamingException {

    LdapSearcher ldapSearcher = new LdapSearcher(config);
    SearchResult searchResult = ldapSearcher.search(CONTEXT, "(uid=john)").getSingleSearchResult();
    assertThat(searchResult).isNotNull();
    assertThat(searchResult.getAttributes().get("uid").get()).isEqualTo("john");
}