code: static String normalizeServicePath(String servicePath) {
      Preconditions.checkNotNull(servicePath, "service path cannot be null");
      if (servicePath.length() == 1) {
        Preconditions.checkArgument(
            "/".equals(servicePath), "service path must equal \"/\" if it is of length 1.");
        servicePath = "";
      } else if (servicePath.length() > 0) {
        if (!servicePath.endsWith("/")) {
          servicePath += "/";
        }
        if (servicePath.startsWith("/")) {
          servicePath = servicePath.substring(1);
        }
      }
      return servicePath;
    }
docs: If the specified service path does not end with a "/" then a "/" is added to the end. If the
  specified service path begins with a "/" then the "/" is removed.