@Test public void testGetNodes() { String node1 = "node1"; String node2 = "node2"; String humanName2 = "humanName2"; Configuration config1 = createTestConfiguration(node1, ConfigurationFormat.HOST); Configuration config2 = createTestConfiguration(node2, ConfigurationFormat.HOST); config2.setHumanName(humanName2); Map<String, Configuration> configs = ImmutableMap.of(node1, config1, node2, config2); assertThat( getNodes(configs), equalTo( ImmutableMap.of( node1, new NodeCompletionMetadata(null), node2, new NodeCompletionMetadata(humanName2)))); }
public static Map<String, NodeCompletionMetadata> getNodes( Map<String, Configuration> configurations) { return configurations.values().stream() .collect( ImmutableMap.toImmutableMap( Configuration::getHostname, config -> new NodeCompletionMetadata(config.getHumanName()))); }
CompletionMetadataUtils { public static Map<String, NodeCompletionMetadata> getNodes( Map<String, Configuration> configurations) { return configurations.values().stream() .collect( ImmutableMap.toImmutableMap( Configuration::getHostname, config -> new NodeCompletionMetadata(config.getHumanName()))); } }
CompletionMetadataUtils { public static Map<String, NodeCompletionMetadata> getNodes( Map<String, Configuration> configurations) { return configurations.values().stream() .collect( ImmutableMap.toImmutableMap( Configuration::getHostname, config -> new NodeCompletionMetadata(config.getHumanName()))); } private  CompletionMetadataUtils(); }
CompletionMetadataUtils { public static Map<String, NodeCompletionMetadata> getNodes( Map<String, Configuration> configurations) { return configurations.values().stream() .collect( ImmutableMap.toImmutableMap( Configuration::getHostname, config -> new NodeCompletionMetadata(config.getHumanName()))); } 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 Map<String, NodeCompletionMetadata> getNodes( Map<String, Configuration> configurations) { return configurations.values().stream() .collect( ImmutableMap.toImmutableMap( Configuration::getHostname, config -> new NodeCompletionMetadata(config.getHumanName()))); } 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; }