@Test(groups = "conn") public void noActiveUrls() throws Exception { final ActivePassiveConnectionStrategy strategy = new ActivePassiveConnectionStrategy(); strategy.initialize( "ldap: ldapURL -> true); strategy.failure(strategy.ldapURLSet.getActiveUrls().iterator().next()); strategy.failure(strategy.ldapURLSet.getActiveUrls().iterator().next()); strategy.failure(strategy.ldapURLSet.getActiveUrls().iterator().next()); strategy.iterator(); strategy.iterator(); strategy.iterator(); strategy.iterator(); }
@Override public Iterator<LdapURL> iterator() { if (!isInitialized()) { throw new IllegalStateException("Strategy is not initialized"); } if (iterFunction != null) { return iterFunction.apply(ldapURLSet.getUrls()); } return new DefaultLdapURLIterator(ldapURLSet.getUrls()); }
ActivePassiveConnectionStrategy extends AbstractConnectionStrategy { @Override public Iterator<LdapURL> iterator() { if (!isInitialized()) { throw new IllegalStateException("Strategy is not initialized"); } if (iterFunction != null) { return iterFunction.apply(ldapURLSet.getUrls()); } return new DefaultLdapURLIterator(ldapURLSet.getUrls()); } }
ActivePassiveConnectionStrategy extends AbstractConnectionStrategy { @Override public Iterator<LdapURL> iterator() { if (!isInitialized()) { throw new IllegalStateException("Strategy is not initialized"); } if (iterFunction != null) { return iterFunction.apply(ldapURLSet.getUrls()); } return new DefaultLdapURLIterator(ldapURLSet.getUrls()); } ActivePassiveConnectionStrategy();  ActivePassiveConnectionStrategy(final Function<List<LdapURL>, Iterator<LdapURL>> function); }
ActivePassiveConnectionStrategy extends AbstractConnectionStrategy { @Override public Iterator<LdapURL> iterator() { if (!isInitialized()) { throw new IllegalStateException("Strategy is not initialized"); } if (iterFunction != null) { return iterFunction.apply(ldapURLSet.getUrls()); } return new DefaultLdapURLIterator(ldapURLSet.getUrls()); } ActivePassiveConnectionStrategy();  ActivePassiveConnectionStrategy(final Function<List<LdapURL>, Iterator<LdapURL>> function); @Override Iterator<LdapURL> iterator(); }
ActivePassiveConnectionStrategy extends AbstractConnectionStrategy { @Override public Iterator<LdapURL> iterator() { if (!isInitialized()) { throw new IllegalStateException("Strategy is not initialized"); } if (iterFunction != null) { return iterFunction.apply(ldapURLSet.getUrls()); } return new DefaultLdapURLIterator(ldapURLSet.getUrls()); } ActivePassiveConnectionStrategy();  ActivePassiveConnectionStrategy(final Function<List<LdapURL>, Iterator<LdapURL>> function); @Override Iterator<LdapURL> iterator();  }