@Test public void testGetZones() { String zone1 = "zone1"; String zone2 = "zone2"; Map<String, Configuration> configs = new HashMap<>(); Configuration config = createTestConfiguration("config1", ConfigurationFormat.HOST); config.setZones(ImmutableSortedMap.of(zone1, new Zone(zone1), zone2, new Zone(zone2))); configs.put("config1", config); assertThat(getZones(configs), equalTo(ImmutableSet.of(zone1, zone2))); }
public static Set<String> getZones(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> zones = ImmutableSet.builder(); configurations .values() .forEach(configuration -> zones.addAll(configuration.getZones().keySet())); return zones.build(); }
CompletionMetadataUtils { public static Set<String> getZones(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> zones = ImmutableSet.builder(); configurations .values() .forEach(configuration -> zones.addAll(configuration.getZones().keySet())); return zones.build(); } }
CompletionMetadataUtils { public static Set<String> getZones(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> zones = ImmutableSet.builder(); configurations .values() .forEach(configuration -> zones.addAll(configuration.getZones().keySet())); return zones.build(); } private  CompletionMetadataUtils(); }
CompletionMetadataUtils { public static Set<String> getZones(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> zones = ImmutableSet.builder(); configurations .values() .forEach(configuration -> zones.addAll(configuration.getZones().keySet())); return zones.build(); } private  CompletionMetadataUtils(); static Set<String> getFilterNames(Map<String, Configuration> configurations); static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations); static Map<Ip, IpCompletionMetadata> getIps(Map<String, Configuration> configurations); static Set<String> getMlagIds(Map<String, Configuration> configurations); static Map<String, NodeCompletionMetadata> getNodes(
      Map<String, Configuration> configurations); static Set<String> getPrefixes(Map<String, Configuration> configurations); static Set<String> getRoutingPolicyNames(Map<String, Configuration> configurations); static Set<Location> getSourceLocationsWithSrcIps(
      Map<Location, LocationInfo> locationInfo); static Set<String> getStructureNames(Map<String, Configuration> configurations); static Set<String> getVrfs(Map<String, Configuration> configurations); static Set<String> getZones(Map<String, Configuration> configurations); }
CompletionMetadataUtils { public static Set<String> getZones(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> zones = ImmutableSet.builder(); configurations .values() .forEach(configuration -> zones.addAll(configuration.getZones().keySet())); return zones.build(); } private  CompletionMetadataUtils(); static Set<String> getFilterNames(Map<String, Configuration> configurations); static Set<NodeInterfacePair> getInterfaces(Map<String, Configuration> configurations); static Map<Ip, IpCompletionMetadata> getIps(Map<String, Configuration> configurations); static Set<String> getMlagIds(Map<String, Configuration> configurations); static Map<String, NodeCompletionMetadata> getNodes(
      Map<String, Configuration> configurations); static Set<String> getPrefixes(Map<String, Configuration> configurations); static Set<String> getRoutingPolicyNames(Map<String, Configuration> configurations); static Set<Location> getSourceLocationsWithSrcIps(
      Map<Location, LocationInfo> locationInfo); static Set<String> getStructureNames(Map<String, Configuration> configurations); static Set<String> getVrfs(Map<String, Configuration> configurations); static Set<String> getZones(Map<String, Configuration> configurations); static Map<Ip, String> WELL_KNOWN_IPS; }