public static String createHttpUrlString(LibertyServer server, String contextRoot, String path) {

        StringBuilder sb = new StringBuilder();
        sb.append("http://")
          .append(server.getHostname())
          .append(":")
          .append(server.getHttpDefaultPort())
          .append("/")
          .append(contextRoot)
          .append("/")
          .append(path);

        return sb.toString();
    }
public static String createHttpUrlString ( LibertyServer server , String contextRoot , String path ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "http://" ) . append ( server . getHostname ( ) ) . append ( ":" ) . append ( server . getHttpDefaultPort ( ) ) . append ( "/" ) . append ( contextRoot ) . append ( "/" ) . append ( path ) ; return sb . toString ( ) ; }
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 string.
@throws Exception