public static URL getServerURL(HttpServer server) throws MalformedURLException {
    assertNotNull("No server", server);
    return new URL("http://" + NetUtils.getHostPortString(server.getConnectorAddress(0)));
  }
Pass in a server, return a URL bound to localhost and its port
@param server server
@return a URL bonded to the base of the server
@throws MalformedURLException if the URL cannot be created.
hbase-http/src/test/java/org/apache/hadoop/hbase/http/HttpServerFunctionalTest.java