@Test
public void toStringTest() {

    //v6
    IpPortAddress addr = new IpPortAddress(new InetSocketAddress("[2001::1:0:1234]", 4321));
    assertEquals("[2001::1:0:1234]:4321", addr.toString());
    assertEquals("[2001::1:0:1234]:4321", new IpPortAddress(new InetSocketAddress("[2001:0000:0000:0000:0000:0001:0000:1234]", 4321)).toString());
    //v4
    addr = new IpPortAddress(new InetSocketAddress("127.0.0.1", 61616));
    assertEquals("127.0.0.1:61616", addr.toString());
}