@Override
    public String toString() {
        if (isReverseLookedUp()) {
            return getHostName() + ":" + getPort();
        } else {
            return getAddress().getHostAddress() + ":" + getPort();
        }
    }
@Test
    public void testToString() throws Exception {
        final InetAddress localHost = Inet4Address.getLoopbackAddress();
        final InetSocketAddress inetSocketAddress = new InetSocketAddress(localHost, 12345);
        final ResolvableInetSocketAddress address = new ResolvableInetSocketAddress(inetSocketAddress);

        assertThat(address.toString()).isEqualTo(address.getAddress().getHostAddress() + ":" + address.getPort());

        address.reverseLookup();

        assertThat(address.toString()).isEqualTo(address.getHostName() + ":" + address.getPort());
    }