// This method creates a file on disk space.
SpoolFile sf = SpoolFile.createTempFile("prefix", "suffics", new File(DIR_NAME));
// Add and release new holder of file.
sf.acquire("holder");
sf.release("holder");
// Now file is free. It can be deleted.
// File is present on the disk. It will be removed from disk space.
assertTrue("File should be removed.", sf.delete());
}