Example #1
0
  protected synchronized String formatUrl(String... path) {
    String baseUrl = getBaseUrl();
    try {
      return UrlUtils.buildUrl(baseUrl, path);
    } catch (MalformedURLException e) {
      e.printStackTrace();
      Assert.fail(
          String.format(
              "Failed to format URL from parts: [%s]. Reason: %s",
              StringUtils.join(path, ", "), e.getMessage()));
    }

    return null;
  }
Example #2
0
 protected synchronized String formatSSLUrl(String... path) throws Exception {
   String baseUrl = getSSLBaseUrl();
   return UrlUtils.buildUrl(baseUrl, path);
 }