Address { private InetSocketAddress resolveAddress() { try { return new InetSocketAddress(InetAddress.getByName(host), port); } catch (final UnknownHostException e) { if (socketAddress.isUnresolved()) { return socketAddress; } return new InetSocketAddress(host, port); } } Address(final String host, final int port);  Address(final String host, final int port, final InetAddress address); static Address local(); static Address from(final String address); static Address from(final String host, final int port); static Address from(final int port); String host(); int port(); InetAddress address(); InetAddress address(final boolean resolve); InetSocketAddress socketAddress(); Type type(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test @Ignore public void testResolveAddress() throws Exception { final Address address = Address.from("localhost", 5000); assertEquals("127.0.0.1", address.address().getHostAddress()); assertEquals(5000, address.port()); }