### Question:
AncestorChildExpansionIterator implements SortedKeyValueIterator<Key,Value> { @Override public void next() throws IOException { if (!seeked) { throw new IllegalStateException("cannot next(), iterator has not been seeked"); } if (initialized && topKey == null) { throw new NoSuchElementException("cannot next(), iterator is empty"); } nextChild(); } AncestorChildExpansionIterator(SortedKeyValueIterator<Key,Value> iterator, List<String> children, Equality equality); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env); @Override boolean hasTop(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); @Override Key getTopKey(); @Override Value getTopValue(); @Override SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env);  }### Answer:
@Test(expected = IllegalStateException.class) public void testUninitializedNext() throws IOException { iterator.next(); }