### Question:
EntryIndexFile implements Iterable<EntryIndexItem> { @Nonnull public EntryIndexItem get(int entryIndex) { checkEmpty(); if (entryIndex < minEntryIndex || entryIndex > maxEntryIndex) { throw new IllegalArgumentException("index < min or index > max"); } return entryIndexMap.get(entryIndex); } 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(expected = IllegalStateException.class) public void testGetEmpty() throws IOException { EntryIndexFile file = new EntryIndexFile(new ByteArraySeekableFile()); file.get(10); }
@Test(expected = IllegalArgumentException.class) public void testGetLessThanMin() throws IOException { EntryIndexFile file = new EntryIndexFile(makeEntryIndexFileContent(3, 4)); file.get(2); }
@Test public void testGet() throws IOException { EntryIndexFile file = new EntryIndexFile(makeEntryIndexFileContent(3, 4)); EntryIndexItem item = file.get(3); Assert.assertNotNull(item); Assert.assertEquals(1, item.getKind()); Assert.assertEquals(3, item.getTerm()); }