AtomicFile { public void delete() { baseName.delete(); backupName.delete(); } AtomicFile(File baseName); boolean exists(); void delete(); OutputStream startWrite(); void endWrite(OutputStream str); InputStream openRead();  }
@Test public void testDelete() throws Exception { assertThat(file.createNewFile()).isTrue(); atomicFile.delete(); assertThat(file.exists()).isFalse(); }