@VisibleForTesting
  static Map<String, String> generatePostfix(Set<java.nio.file.Path> pathKeys) {
    Map<String, String> rawPathToMethodVer = new HashMap<>();
    for (java.nio.file.Path path : pathKeys) {

      java.nio.file.Path firstLevel = path.subpath(0, 1);
      String version = isVersion(firstLevel.toString()) ? firstLevel.toString() : "";
      rawPathToMethodVer.put(path.toString(), version.toUpperCase());
    }

    return rawPathToMethodVer;
  }
@Test
  public void testRawPathMapping() {
    // Following are the actual exhausted list of paths in Tables services at version
    Set<String> paths = new HashSet<>();
    paths.add("/v0/databases");
    paths.add("/v0.9/databases");
    paths.add("/v1/databases");
    paths.add("/databases");
    paths.add("/databases/{databaseId}/aclPolicies");
    paths.add("/v0/databases/{databaseId}/aclPolicies");
    paths.add("/databases/{databaseId}/tables/{tableId}/aclPolicies");
    paths.add("/v0/databases/{databaseId}/tables/{tableId}/aclPolicies");
    paths.add("/v0/databases/{databaseId}/tables");
    paths.add("/databases/{databaseId}/tables");
    paths.add("/databases/{databaseId}/tables/{tableId}");
    paths.add("/v0/databases/{databaseId}/tables/{tableId}");
    paths.add("/v0/databases/{databaseId}/tables/{tableId}/iceberg/v2/snapshots");
    paths.add("/databases/{databaseId}/tables/{tableId}/iceberg/v2/snapshots");

    Map<String, String> result =
        MainApplicationConfig.generatePostfix(
            paths.stream().map(Paths::get).collect(Collectors.toSet()));
    Assertions.assertEquals(result.size(), paths.size());
    Assertions.assertEquals(result.get("/v0/databases"), "V0");
    Assertions.assertEquals(result.get("/v1/databases"), "V1");
    Assertions.assertEquals(result.get("/databases"), "");
    Assertions.assertEquals(result.get("/databases/{databaseId}/aclPolicies"), "");
    Assertions.assertEquals(result.get("/v0/databases/{databaseId}/aclPolicies"), "V0");
    Assertions.assertEquals(result.get("/databases/{databaseId}/tables/{tableId}/aclPolicies"), "");
    Assertions.assertEquals(
        result.get("/v0/databases/{databaseId}/tables/{tableId}/aclPolicies"), "V0");
    Assertions.assertEquals(result.get("/v0/databases/{databaseId}/tables"), "V0");
    Assertions.assertEquals(result.get("/databases/{databaseId}/tables"), "");
    Assertions.assertEquals(result.get("/databases/{databaseId}/tables/{tableId}"), "");
    Assertions.assertEquals(result.get("/v0/databases/{databaseId}/tables/{tableId}"), "V0");
    Assertions.assertEquals(
        result.get("/v0/databases/{databaseId}/tables/{tableId}/iceberg/v2/snapshots"), "V0");
    Assertions.assertEquals(
        result.get("/databases/{databaseId}/tables/{tableId}/iceberg/v2/snapshots"), "");
  }