listenerControl.verify();
}
final public void testIndexDataSourceboolean() throws Exception {
MockControl indexFactoryControl = MockControl.createStrictControl(IndexFactory.class);
IndexFactory indexFactory = (IndexFactory)indexFactoryControl.getMock();
MockControl indexWriterControl = MockControl.createStrictControl(LuceneIndexWriter.class);
LuceneIndexWriter indexWriter = (LuceneIndexWriter)indexWriterControl.getMock();
MockControl listenerControl = MockControl.createControl(DatabaseIndexingListener.class);
DatabaseIndexingListener listener = (DatabaseIndexingListener)listenerControl.getMock();
//requests
SqlRequest request1 = new SqlRequest("select * from test");
SqlRequest request2 = new SqlRequest("select * from test");
//documents
final Document document1 = new Document();
document1.add(new Field("contents", "test_name", Field.Store.NO, Field.Index.TOKENIZED));
final Document document2 = new Document();
document2.add(new Field("contents", "test_name", Field.Store.NO, Field.Index.TOKENIZED));
indexFactory.getIndexWriter();
indexFactoryControl.setReturnValue(indexWriter, 1);
listener.beforeIndexingRequest(request1);
listenerControl.setVoidCallable(1);