### Question:
LocalDocumentItemWriter implements DocumentItemWriter { @Override public void revert() { IOUtils.closeQuietly(bufferedWriter); if (!outFile.delete()) logger.warn("File {} was not deleted. Exists: {}", outFile.getAbsolutePath(), outFile.exists()); } LocalDocumentItemWriter(File outFile, ItemWriterListener itemWriterListener); @Override void write(Document document); @Override void revert(); @Override void close();  }### Answer:
@Test public void testRevert() throws Exception { replayAll(); localDocumentItemWriter.write(DOCUMENT); localDocumentItemWriter.revert(); assertThat(outFile.exists(), is(false)); }