### Question:
InetSocketAddressUtils { public static String asString(SocketAddress socketAddress) { final InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress; final InetAddress inetAddress = inetSocketAddress.getAddress(); String host = inetSocketAddress.getHostName(); if (inetAddress != null) { host = inetAddress.getHostAddress(); } return host + ":" + inetSocketAddress.getPort(); } private  InetSocketAddressUtils(); static String asString(SocketAddress socketAddress); static InetSocketAddress[] parseAddressList(String[] addresses); static InetSocketAddress createInetSocketAddress(String address); static InetSocketAddress createInetSocketAddress(String address, int defaultPort);  }### Answer:
@Test public void testAddressAsString() { assertEquals("127.0.0.1:9003", asString(new InetSocketAddress("localhost", 9003))); assertEquals("5.5.5.5:9003", asString(new InetSocketAddress("5.5.5.5", 9003))); }