ConfigSourceSet implements ConfigSource { public Set<String> getSources() { return Collections.unmodifiableSet(sources); } ConfigSourceSet();  ConfigSourceSet(List<String> addresses);  ConfigSourceSet(String[] addresses);  ConfigSourceSet(String address); Set<String> getSources(); boolean equals(Object o); int hashCode(); String toString(); static ConfigSourceSet createDefault();  }
@Test public void testIterationOrder() { String[] hosts = new String[]{"primary", "fallback", "last-resort"}; ConfigSourceSet css = new ConfigSourceSet(hosts); Set<String> sources = css.getSources(); assertEquals(hosts.length, sources.size()); int i = 0; for (String s : sources) { assertEquals(hosts[i++], s); } }