@Test
public void testCreateUri() throws Exception {

    final InetAddress localhost = InetAddress.getByName("127.0.0.1");
    final InetSocketAddress address =
        new InetSocketAddress(localhost, 4242);
    final URI uri = TcpUriFactory.createUri(address);
    Assert.assertEquals("tcp://" + localhost.getHostName()
            + ":4242", uri.toString());
}