@Test(groups = "conn", dataProvider = "urls")
public void iterator(final String actual, final LdapURL[] expected)
{

  final RandomConnectionStrategy strategy = new RandomConnectionStrategy();
  strategy.initialize(actual, ldapURL -> true);
  Assert.assertEquals(
    (HashSet) StreamSupport.stream(strategy.spliterator(), false).collect(Collectors.toCollection(HashSet::new)),
    (HashSet) Stream.of(expected).collect(Collectors.toCollection(HashSet::new)));
  Assert.assertEquals(
    (HashSet) StreamSupport.stream(strategy.spliterator(), false).collect(Collectors.toCollection(HashSet::new)),
    (HashSet) Stream.of(expected).collect(Collectors.toCollection(HashSet::new)));
  Assert.assertEquals(
    (HashSet) StreamSupport.stream(strategy.spliterator(), false).collect(Collectors.toCollection(HashSet::new)),
    (HashSet) Stream.of(expected).collect(Collectors.toCollection(HashSet::new)));
  Assert.assertEquals(
    (HashSet) StreamSupport.stream(strategy.spliterator(), false).collect(Collectors.toCollection(HashSet::new)),
    (HashSet) Stream.of(expected).collect(Collectors.toCollection(HashSet::new)));
  Assert.assertEquals(
    (HashSet) StreamSupport.stream(strategy.spliterator(), false).collect(Collectors.toCollection(HashSet::new)),
    (HashSet) Stream.of(expected).collect(Collectors.toCollection(HashSet::new)));
}