@Test
public void testClose() throws Exception {

	// Do not delete on close
	ByteArrayFileInputStream byteArrayFileInputStream =
		new ByteArrayFileInputStream(_testFile, 512);
	byteArrayFileInputStream.read();
	byteArrayFileInputStream.close();
	Assert.assertNull(_dataField.get(byteArrayFileInputStream));
	Assert.assertNull(_fileField.get(byteArrayFileInputStream));
	Assert.assertNull(_fileInputStreamField.get(byteArrayFileInputStream));
	Assert.assertTrue(_testFile.exists());
	// Delete on close
	byteArrayFileInputStream = new ByteArrayFileInputStream(
		_testFile, 512, true);
	byteArrayFileInputStream.close();
	Assert.assertNull(_dataField.get(byteArrayFileInputStream));
	Assert.assertNull(_fileField.get(byteArrayFileInputStream));
	Assert.assertNull(_fileInputStreamField.get(byteArrayFileInputStream));
	Assert.assertFalse(_testFile.exists());
	byteArrayFileInputStream.close();
}