### Question:
StandardTocWriter implements TocWriter { @Override public String toString() { return "TOC Writer for " + file; } StandardTocWriter(final File file, final boolean compressionFlag, final boolean alwaysSync); @Override void addBlockOffset(final long offset, final long firstEventId); @Override void sync(); @Override int getCurrentBlockIndex(); @Override void close(); @Override File getFile(); @Override String toString(); static final byte VERSION; }### Answer:
@Test public void testOverwriteEmptyFile() throws IOException { final File tocFile = new File("target/" + UUID.randomUUID().toString() + ".toc"); try { assertTrue( tocFile.createNewFile() ); try (final StandardTocWriter writer = new StandardTocWriter(tocFile, false, false)) { } } finally { FileUtils.deleteFile(tocFile, false); } }