### Question:
FileBlockRecorder implements BlockRecorder, AutoCloseable { @Override public void close() throws Exception { if (this.fwriter != null) { this.fwriter.close(); this.fwriter = null; } } FileBlockRecorder(String filename); void writeBlock(Block block); @Override void close();  }### Answer:
@Test public void createFile() throws Exception { FileBlockRecorder recorder = new FileBlockRecorder("testrecorder.txt"); File file = new File("testrecorder.txt"); Assert.assertTrue(file.exists()); recorder.close(); Assert.assertTrue(file.delete()); }