code: protected String normalizePath(String path) {
          if (!path.startsWith("/")) {
              path = "/" + path;
          }
          if (!path.equals("/")) {
              path = StringUtils.stripEnd(path, "/");
          }
  
          return path;
      }
docs: Normalize the path: this means, append a leading '/' at the beginning and remove any trailing '/' (unless
  the path is root). This is done for consistency in handling paths.
  
  @param path
  @return the normalized path (with a leading '/' and without a trailing '/')