code: static String normalizeRootUrl(String rootUrl) {
      Preconditions.checkNotNull(rootUrl, "root URL cannot be null.");
      if (!rootUrl.endsWith("/")) {
        rootUrl += "/";
      }
      return rootUrl;
    }
docs: If the specified root URL does not end with a "/" then a "/" is added to the end.