DnsServerAddresses { public static DnsServerAddresses sequential(Iterable<? extends InetSocketAddress> addresses) { return sequential0(sanitize(addresses)); }  static List<InetSocketAddress> defaultAddressList(); static DnsServerAddresses defaultAddresses(); static DnsServerAddresses sequential(Iterable<? extends InetSocketAddress> addresses); static DnsServerAddresses sequential(InetSocketAddress... addresses); static DnsServerAddresses shuffled(Iterable<? extends InetSocketAddress> addresses); static DnsServerAddresses shuffled(InetSocketAddress... addresses); static DnsServerAddresses rotational(Iterable<? extends InetSocketAddress> addresses); static DnsServerAddresses rotational(InetSocketAddress... addresses); static DnsServerAddresses singleton(final InetSocketAddress address); abstract DnsServerAddressStream stream();  }
@Test public void testSequential() { DnsServerAddresses seq = DnsServerAddresses.sequential(ADDR1, ADDR2, ADDR3); assertThat(seq.stream(), is(not(sameInstance(seq.stream())))); for (int j = 0; j < 2; j ++) { DnsServerAddressStream i = seq.stream(); assertNext(i, ADDR1); assertNext(i, ADDR2); assertNext(i, ADDR3); assertNext(i, ADDR1); assertNext(i, ADDR2); assertNext(i, ADDR3); } }