EntityIterator with unit tests