@Test public void testGetMlags() { String mlag1 = "mlag1"; String mlag2 = "mlag2"; Map<String, Configuration> configs = new HashMap<>(); Configuration config = createTestConfiguration("config1", ConfigurationFormat.HOST); config.setMlags( ImmutableSortedMap.of( mlag1, Mlag.builder().setId(mlag1).build(), mlag2, Mlag.builder().setId(mlag2).build())); configs.put("config1", config); assertThat(getMlagIds(configs), equalTo(ImmutableSet.of(mlag1, mlag2))); }
public static Set<String> getMlagIds(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> mlags = ImmutableSet.builder(); configurations .values() .forEach(configuration -> configuration.getMlags().keySet().stream().forEach(mlags::add)); return mlags.build(); }
CompletionMetadataUtils { public static Set<String> getMlagIds(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> mlags = ImmutableSet.builder(); configurations .values() .forEach(configuration -> configuration.getMlags().keySet().stream().forEach(mlags::add)); return mlags.build(); } }
CompletionMetadataUtils { public static Set<String> getMlagIds(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> mlags = ImmutableSet.builder(); configurations .values() .forEach(configuration -> configuration.getMlags().keySet().stream().forEach(mlags::add)); return mlags.build(); } private  CompletionMetadataUtils(); }
CompletionMetadataUtils { public static Set<String> getMlagIds(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> mlags = ImmutableSet.builder(); configurations .values() .forEach(configuration -> configuration.getMlags().keySet().stream().forEach(mlags::add)); return mlags.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> getMlagIds(Map<String, Configuration> configurations) { ImmutableSet.Builder<String> mlags = ImmutableSet.builder(); configurations .values() .forEach(configuration -> configuration.getMlags().keySet().stream().forEach(mlags::add)); return mlags.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; }