### Question:
EntryIndexFile implements Iterable<EntryIndexItem> { public void clear() throws IOException { seekableFile.truncate(0L); entryIndexCount = 0; entryIndexMap.clear(); } EntryIndexFile(File file);  EntryIndexFile(SeekableFile seekableFile); boolean isEmpty(); int getMinEntryIndex(); int getMaxEntryIndex(); int getEntryIndexCount(); void appendEntryIndex(int index, long offset, int kind, int term); void clear(); void removeAfter(int newMaxEntryIndex); long getOffset(int entryIndex); @Nonnull EntryIndexItem get(int entryIndex); @Override @Nonnull Iterator<EntryIndexItem> iterator(); void close();  }### Answer:
@Test public void testClear() throws IOException { ByteArraySeekableFile seekableFile = makeEntryIndexFileContent(5, 6); EntryIndexFile file = new EntryIndexFile(seekableFile); Assert.assertFalse(file.isEmpty()); file.clear(); Assert.assertTrue(file.isEmpty()); Assert.assertEquals(0, file.getEntryIndexCount()); Assert.assertEquals(0L, seekableFile.size()); }