### Question:
AbstractIndexedIterator extends AbstractIterator<E> { protected abstract E get(int position); protected  AbstractIndexedIterator(final int size); protected  AbstractIndexedIterator(final int start, final int size);   }### Answer:
@Test public void testFullIteration() { final AbstractIndexedIterator<String> testIterator = new AbstractIndexedIterator<String>(testData.size()) { @Override protected String get(final int position) { return testData.get(position); } }; assertTrue(elementsEqual(testData.iterator(), testIterator)); }
@Test public void testSlice() { final AbstractIndexedIterator<String> testIterator = new AbstractIndexedIterator<String>(1, testData.size()) { @Override protected String get(final int position) { return testData.get(position); } }; assertTrue(elementsEqual(skip(testData, 1).iterator(), testIterator)); }