int getReservePoolRemainingSegmentCount(String storeId, int segmentSize) {
    File storeReserveDir = new File(reserveFileDir, STORE_DIR_PREFIX + storeId);
    File fileSizeDir = new File(storeReserveDir, DiskSpaceAllocator.generateFileSizeDirName(segmentSize));
    String[] filenameList = fileSizeDir.list();
    return filenameList == null ? 0 : filenameList.length;
  }
Returns the number of segments remaining in the reserve pool for the given store ID and segment size.
@param storeId the ID of the store.
@param segmentSize the size of the segment.
@return the number of segments remaining in the reserve pool.
ambry-store/src/test/java/com/github/ambry/store/FileStoreTest.java