"when\n" +
" Person( name == \"Fred\" )\n" +
"then\n" +
"end";
final GuidedDecisionTree model = new GuidedDecisionTree();
model.setTreeName( "test" );
final TypeNode type1 = new TypeNodeImpl( "Person" );
final ConstraintNode c1a = new ConstraintNodeImpl( "Person",
"name",
"==",
new StringValue( "Michael" ) );
final ConstraintNode c1b = new ConstraintNodeImpl( "Person",
"name",
"==",
new StringValue( "Fred" ) );
final TypeNode type2 = new TypeNodeImpl( "Address" );
final ConstraintNode c2a = new ConstraintNodeImpl( "Address",
"country",
"==",
new StringValue( "England" ) );
final ConstraintNode c2b = new ConstraintNodeImpl( "Address",
"country",
"==",
new StringValue( "Norway" ) );
model.setRoot( type1 );
type1.addChild( c1a );
type1.addChild( c1b );
c1a.addChild( type2 );
type2.addChild( c2a );
type2.addChild( c2b );