MemoryAsyncLogDataStore implements AsyncLogDataStore { @Override public Iterator<LogData> iterator() { try { return service.submit(new OperationGetIterator(logDataStore)).get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } return null; } MemoryAsyncLogDataStore(ListeningExecutorService service, LogDataStore logDataStore); @Override int getCount(); @Override ListenableFuture remove(final int... ids); @Override ListenableFuture<FilterResult> filter(LogDataFilter filter); @Override ListenableFuture<SearchResult> search(SearchCriteria searchCriteria); @Override LogData getLogData(int row); @Override Integer getLogDataIdInRow(int row); @Override int getLimit(); @Override void setLimit(int limit); @Override void add(final LogData... logDatas); @Override LogData[] getLogData(); @Override int clear(); @Override void addNoteToRow(int row, Note note); @Override Note getNote(int row); @Override Note removeNote(int row); @Override void clearNotes(); @Override TreeMap<Integer, Note> getAllNotes(); @Override Iterator<LogData> iterator(); @Override boolean isMarked(int row); @Override MarkerColors getMarkerColors(int row); @Override void markRows(MarkerColors markerColors, int... rows); @Override void unmarkRows(int... rows);  }
@Test public void testIterator() throws Exception { Iterator<LogData> iterator = store.iterator(); int count = 0; AssertJUnit.assertNotNull(iterator); while (iterator.hasNext()) { LogData next = iterator.next(); AssertJUnit.assertEquals(next.getId(), count); count++; } AssertJUnit.assertEquals(LOG_EVENT_COUNT, count); }