@Test public void testSearchLdap() { context.checking(new Expectations() { { oneOf(ldapTemplateMock).search(with(any(String.class)), with(any(String.class)), with(any(SearchControls.class)), with(any(CollectingNameClassPairCallbackHandler.class))); oneOf(handlerMock).getList(); } }); sut.searchLdap(ldapTemplateMock, "cn=groupname", searchControlsMock, handlerMock); context.assertIsSatisfied(); }
@Override public void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter, final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler) { if (logger.isTraceEnabled()) { logger.trace("Beginning direct search of ldap with filter: " + inEncodedFilter); } inLdapTemplate.search("", inEncodedFilter, inSearchControls, inHandler); if (logger.isTraceEnabled()) { logger.trace("Completed direct search of ldap with " + inHandler.getList().size() + " results."); } }
DefaultLdapSearchStrategy implements LdapSearchStrategy { @Override public void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter, final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler) { if (logger.isTraceEnabled()) { logger.trace("Beginning direct search of ldap with filter: " + inEncodedFilter); } inLdapTemplate.search("", inEncodedFilter, inSearchControls, inHandler); if (logger.isTraceEnabled()) { logger.trace("Completed direct search of ldap with " + inHandler.getList().size() + " results."); } } }
DefaultLdapSearchStrategy implements LdapSearchStrategy { @Override public void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter, final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler) { if (logger.isTraceEnabled()) { logger.trace("Beginning direct search of ldap with filter: " + inEncodedFilter); } inLdapTemplate.search("", inEncodedFilter, inSearchControls, inHandler); if (logger.isTraceEnabled()) { logger.trace("Completed direct search of ldap with " + inHandler.getList().size() + " results."); } }  }
DefaultLdapSearchStrategy implements LdapSearchStrategy { @Override public void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter, final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler) { if (logger.isTraceEnabled()) { logger.trace("Beginning direct search of ldap with filter: " + inEncodedFilter); } inLdapTemplate.search("", inEncodedFilter, inSearchControls, inHandler); if (logger.isTraceEnabled()) { logger.trace("Completed direct search of ldap with " + inHandler.getList().size() + " results."); } }  @Override void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter,
            final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler); }
DefaultLdapSearchStrategy implements LdapSearchStrategy { @Override public void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter, final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler) { if (logger.isTraceEnabled()) { logger.trace("Beginning direct search of ldap with filter: " + inEncodedFilter); } inLdapTemplate.search("", inEncodedFilter, inSearchControls, inHandler); if (logger.isTraceEnabled()) { logger.trace("Completed direct search of ldap with " + inHandler.getList().size() + " results."); } }  @Override void searchLdap(final LdapTemplate inLdapTemplate, final String inEncodedFilter,
            final SearchControls inSearchControls, final CollectingNameClassPairCallbackHandler inHandler);  }