final File tmp = new File(tmpdir, "target.txt.tmp");
target.delete();
assertFalse("file should not exist", target.exists());
boolean exception = false;
try {
new AtomicFileWritingIdiom(target, new WriterStatement() {
@Override
public void write(Writer os) throws IOException {
os.write("after");
os.flush();
assertTrue("implementation of AtomicFileOutputStream has changed, update the test", tmp.exists());