assertTrue("File should be deleted.", sf.delete());
}
public void testDeleteExistingSwapFile() throws IOException
{
SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
// write to file
OutputStream out = new FileOutputStream(sf);
byte[] outWrite = new byte[]{1, 2, 3};
out.write(outWrite);
out.close();
sf.spoolDone();
// File is present on the disk. It will be removed from disk space.
assertTrue("File should be deleted.", sf.delete());
}