private void freeAndVerify(String storeId, File file, long size, boolean isSwapSegment) throws Exception {
    alloc.free(file, size, storeId, isSwapSegment);
    assertFalse("File should have been returned to the pool: " + file.getAbsolutePath(), file.exists());
  }
Free a file and check that it was moved away from the allocated file's path.
@param storeId the id of store which the file is associated with.
@param file the file to free.
@param size the size of the file (required by the API of {@link DiskSpaceAllocator#free(File, long, String, boolean)}
@param isSwapSegment whether this is a swap segment to free.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/DiskSpaceAllocatorTest.java