@Test public void testExecuteNoResults() { final LdapLookupRequest rqst = new LdapLookupRequest(NTID); context.checking(new Expectations() { { allowing(ldapQueryMapper).execute(with(equalInternally(rqst))); will(returnValue(Collections.EMPTY_LIST)); } }); String result = sut.execute(NTID); context.assertIsSatisfied(); assertNull(result); }
@Override public String execute(final String inRequest) { List<String> results = ldapQueryMapper.execute(new LdapLookupRequest(inRequest)); return results.isEmpty() ? null : results.get(0); }
LdapSingleValueLookupMapper implements DomainMapper<String, String> { @Override public String execute(final String inRequest) { List<String> results = ldapQueryMapper.execute(new LdapLookupRequest(inRequest)); return results.isEmpty() ? null : results.get(0); } }
LdapSingleValueLookupMapper implements DomainMapper<String, String> { @Override public String execute(final String inRequest) { List<String> results = ldapQueryMapper.execute(new LdapLookupRequest(inRequest)); return results.isEmpty() ? null : results.get(0); } LdapSingleValueLookupMapper(final DomainMapper<LdapLookupRequest, List<String>> inLdapQueryMapper); }
LdapSingleValueLookupMapper implements DomainMapper<String, String> { @Override public String execute(final String inRequest) { List<String> results = ldapQueryMapper.execute(new LdapLookupRequest(inRequest)); return results.isEmpty() ? null : results.get(0); } LdapSingleValueLookupMapper(final DomainMapper<LdapLookupRequest, List<String>> inLdapQueryMapper); @Override String execute(final String inRequest); }
LdapSingleValueLookupMapper implements DomainMapper<String, String> { @Override public String execute(final String inRequest) { List<String> results = ldapQueryMapper.execute(new LdapLookupRequest(inRequest)); return results.isEmpty() ? null : results.get(0); } LdapSingleValueLookupMapper(final DomainMapper<LdapLookupRequest, List<String>> inLdapQueryMapper); @Override String execute(final String inRequest);  }