private void assertSnapshotFiles(String metadataDirectory, int numberForSnapshotFiles) {
    File[] matchingFiles = new File(metadataDirectory).listFiles((dir, name) -> name.startsWith("snap-"));
    List<File> files = Optional.ofNullable(matchingFiles).map(Arrays::asList).orElse(Collections.emptyList());
    LOG.debug("Snapshot files found in directory({}): {}", metadataDirectory, files);
    Assert.assertEquals(String.format("Unexpected no. of snapshot files in metadata directory: %s",
        metadataDirectory), numberForSnapshotFiles, files.size());
  }
Creates IcebergHouseKeeperService that's configured to clean up a table by database and table name.

@param tableName to be cleaned up
@return IcebergHouseKeeperService
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/metastore/task/TestIcebergHouseKeeperService.java