code: public static URL createHttpUrl(LibertyServer server, String contextRoot, String path) throws Exception {
          URL result = new URL("http://" + server.getHostname() + ":" + server.getHttpDefaultPort() +
                               "/" + contextRoot + "/" + path);
  
          return result;
      }
docs: Construct a URL for a test case so a request can be made.
  
  @param server - The server that is under test, this is used to get the port and host name.
  @param contextRoot - The context root of the application
  @param path - Additional path information for the request.
  @return - A fully formed URL.
  @throws Exception