Restriction r3 = LiteralRestriction.createRestriction( pattern,
"" );
Restriction r4 = LiteralRestriction.createRestriction( pattern,
"" );
Solvers solvers = new Solvers();
solvers.startRuleSolver( rule );
solvers.startOperator( OperatorDescrType.AND );
solvers.startPatternSolver( pattern );
solvers.startOperator( OperatorDescrType.AND );
solvers.addPatternComponent( r );
solvers.addPatternComponent( r2 );
solvers.endOperator();
solvers.endPatternSolver();
solvers.startNot();
solvers.startPatternSolver( pattern );
solvers.startOperator( OperatorDescrType.AND );
solvers.addPatternComponent( r3 );
solvers.addPatternComponent( r4 );
solvers.endOperator();
solvers.endPatternSolver();
solvers.endNot();
solvers.endOperator();
solvers.endRuleSolver();
List<SubRule> list = solvers.getRulePossibilities();
assertEquals( 1,
list.size() );
assertEquals( 2,
list.get( 0 ).getItems().size() );