Rule rule = (Rule) ruleset.getRules().get( 0 );
Condition cond = (Condition) rule.getConditions().get( 0 );
assertEquals( "Foo(myObject.getColour().equals(red), myObject.size () > 1)",
cond.getSnippet() );
Consequence cons = (Consequence) rule.getConsequences().get( 0 );
assertNotNull( cons );
assertEquals( "myObject.setIsValid(Y);",
cons.getSnippet() );
rule = (Rule) ruleset.getRules().get( 5 );
cond = (Condition) rule.getConditions().get( 1 );
assertEquals( "myObject.size () > 7",
cond.getSnippet() );
cons = (Consequence) rule.getConsequences().get( 0 );
assertEquals( "myObject.setIsValid(10-Jul-1974)",
cons.getSnippet() );
}