add unit test for URI specified by hostname and port