Destination { public Stream<String> getIPs() { try { return Stream.of(InetAddress.getAllByName(host)) .map(InetAddress::getHostAddress); } catch (UnknownHostException e) { throw new RuntimeException(e); } } Destination(String host, Port port);  Destination(String uriString); boolean noPort(); String getHost(); Stream<String> getIPs(); Port getPort(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void get_ips_from_uri_with_fqdn() throws Exception { Destination destination = new Destination("mysql: Assertions.assertThat(destination.getIPs().collect(Collectors.toList())).containsOnly("127.0.0.1"); }