@Test public void validateHostPortList_ok_hostname() { List<InetSocketAddress> validHosts = InetSocketAddressConverter.getInetSocketAddresses( new String[]{ "some-host:9510", "some-host", "pif:9610", "piaf22:9710" }); InetSocketAddress server1 = InetSocketAddress.createUnresolved("some-host", 9510); InetSocketAddress server2 = InetSocketAddress.createUnresolved("some-host", 0); InetSocketAddress server3 = InetSocketAddress.createUnresolved("pif", 9610); InetSocketAddress server4 = InetSocketAddress.createUnresolved("piaf22", 9710); assertThat(validHosts, hasItems(server1, server2, server3, server4)); }
public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); } }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }  }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }  static InetSocketAddress getInetSocketAddress(String server); static InetSocketAddress getInetSocketAddress(String hostPort, int defaultPort); static List<InetSocketAddress> getInetSocketAddresses(String[] servers); static List<InetSocketAddress> getInetSocketAddresses(String[] servers, int defaultPort); static String toHostPort(InetSocketAddress address); }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }  static InetSocketAddress getInetSocketAddress(String server); static InetSocketAddress getInetSocketAddress(String hostPort, int defaultPort); static List<InetSocketAddress> getInetSocketAddresses(String[] servers); static List<InetSocketAddress> getInetSocketAddresses(String[] servers, int defaultPort); static String toHostPort(InetSocketAddress address);  }