ScannerIterator and tests for it.