A few unit tests use DataNodeTestUtils#getPendingAsyncDeletions to retrieve the number of pending async deletions. It internally calls FsDatasetTestUtil#getPendingAsyncDeletions:
This assumes FsDatasetImpl is (the only implementation of) FsDataset. However FsDataset is pluggable and can have other implementations.
We can abstract getting the number of async deletions in FsDatasetTestUtils.