int checkBackupPathAgainstBasePath() {
    if (cfg.backupPath == null) {
      LOG.error("Backup path is not configured");
      return -1;
    }

    if (cfg.backupPath.contains(cfg.basePath)) {
      LOG.error(String.format("Cannot use backup path %s: it resides in the base path %s",
          cfg.backupPath, cfg.basePath));
      return -1;
    }
    return 0;
  }
@Test
  public void testCheckBackupPathAgainstBasePath() {
    configPathParams().forEach(arguments -> {
      Object[] args = arguments.get();
      String backupPath = (String) args[0];
      String basePath = (String) args[1];
      int expectedResult = (Integer) args[2];

      HoodieRepairTool.Config config = new HoodieRepairTool.Config();
      config.backupPath = backupPath;
      config.basePath = basePath;
      HoodieRepairTool tool = new HoodieRepairTool(jsc, config);
      assertEquals(expectedResult, tool.checkBackupPathAgainstBasePath());
    });
  }