@Override
    public String toString()
    {
        if (isResolved()) {
            return resolved.toString();
        }
        else if (protocol != null && !address.isEmpty()) {
            return protocol.name() + "://" + address;
        }
        else {
            return "";
        }
    }
@Test
    public void testToNotResolvedToString()
    {
        Address addr = new Address("tcp", "google.com:90");
        String saddr = addr.toString();
        assertThat(saddr, is("tcp://google.com:90"));
    }