iterator.setCallback(new Callback() { @Override
public void call() { /* do nothing */ } });
assertEquals(0, iterator.getReturnedElementCount());
Context context = new Context() ;
context.set(ARQ.spillToDiskThreshold, 10L) ;
ExecutionContext executionContext = new ExecutionContext(context, (Graph)null, (DatasetGraph)null, (OpExecutorFactory)null) ;
QueryIterSort qIter = new QueryIterSort(iterator, comparator, executionContext) ;
// Usually qIter should be in a try/finally block, but we are testing the case that the user forgot to do that.
// As a failsafe, QueryIteratorBase should close it when the iterator is exhausted.
assertEquals(0, iterator.getReturnedElementCount()) ;