### Question:
DnsUntil { public static InetSocketAddress toIpAddress(String hostName, int port) { InetSocketAddress socketAddress; try { InetAddress address = InetAddress.getByName(hostName); String ipAddress = address.getHostAddress(); socketAddress = InetSocketAddress.createUnresolved(ipAddress, port); } catch (UnknownHostException e) { throw new RuntimeException(e); } return socketAddress; } private  DnsUntil(); static SocketAddress checkInetSocketAddress(SocketAddress address); static InetSocketAddress toIpAddress(String hostName, int port);  }### Answer:
@Test public void testShouldReturnIpAddress() { InetSocketAddress inetSocketAddress = DnsUntil.toIpAddress("localhost", 8001); InetSocketAddress unresolved = InetSocketAddress.createUnresolved("127.0.0.1", 8001); Assert.assertTrue(unresolved.equals(inetSocketAddress)); }