private int getNumberOfFilesMatchingSuffix(File dir, String suffix) {
    assertDirectoryIsValid(dir);

    File[] files = dir.listFiles();
    assertNotNull(files);
    int count = 0;
    for (File file : files) {
      if (file.getName().endsWith(suffix)) {
        count++;
      }
    }
    return count;
  }
Returns the number of files in the given directory matching the given suffix.
@param dir the directory to check.
@param suffix the suffix to match.
@return the number of files matching the suffix.
ambry-file-transfer/src/test/java/com/github/ambry/filetransfer/handler/StoreFileCopyHandlerIntegTest.java