List<Evaluator<? extends ExprNode>> evaluators = new ArrayList<Evaluator<? extends ExprNode>>();
List<Cursor<IndexEntry<?, String>>> cursors = new ArrayList<Cursor<IndexEntry<?, String>>>();
Evaluator<? extends ExprNode> eval;
Cursor<IndexEntry<?, Long>> cursor;
OrNode orNode = new OrNode();
ExprNode exprNode = new SubstringNode( schemaManager.getAttributeType( "cn" ), "J", null );
eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );
Cursor subStrCursor1 = new SubstringCursor( store, ( SubstringEvaluator ) eval );
cursors.add( subStrCursor1 );
evaluators.add( eval );
orNode.addNode( exprNode );
// try
// {
// new OrCursor( cursors, evaluators );
// fail( "should throw IllegalArgumentException" );
// }
// catch( IllegalArgumentException ie ){ }
exprNode = new SubstringNode( schemaManager.getAttributeType( "sn" ), "W", null );
eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );
evaluators.add( eval );
Cursor subStrCursor2 = new SubstringCursor( store, ( SubstringEvaluator ) eval );
cursors.add( subStrCursor2 );
orNode.addNode( exprNode );
cursor = new OrCursor( cursors, evaluators );
cursor.beforeFirst();
assertFalse( cursor.available() );