public void testCounterSetup() throws Exception {
TermCollectionVisitor termVisitor = new TermCollectionVisitor();
CounterSetupVisitor setupVisitor = new CounterSetupVisitor( termVisitor );
CounterCollectionVisitor counterCollectionVisitor = new CounterCollectionVisitor( setupVisitor );
it.unimi.dsi.mg4j.query.nodes.Query query = simpleParser.parse( "this" );
DocumentIteratorBuilderVisitor documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( null, index0, Integer.MAX_VALUE );
DocumentIterator indexIterator = query.accept( documentIteratorBuilderVisitor );
indexIterator.nextDocument();
termVisitor.prepare();
indexIterator.accept( termVisitor );
setupVisitor.prepare();
indexIterator.accept( setupVisitor );
// assertEquals( 3, indexIterator.frequency() );
assertEquals( 3, setupVisitor.frequency[ 0 ] );