@Test
public void testToString() throws Exception {

    final URIAuthority host1 = new URIAuthority("somehost");
    Assert.assertEquals("somehost", host1.toString());
    final URIAuthority host2 = new URIAuthority("somehost", -1);
    Assert.assertEquals("somehost", host2.toString());
    final URIAuthority host3 = new URIAuthority("somehost", 8888);
    Assert.assertEquals("somehost:8888", host3.toString());
}