List list = new ArrayList();
ksession.setGlobal( "list",
list );
Person p0 = new Person( "yoda", 0 );
p0.setLikes( "cheddar" );
FactHandle fh0 = ksession.insert( p0 );
Person p1 = new Person( "darth", 15 );
p1.setLikes( "cheddar" );
FactHandle fh1 = ksession.insert( p1 );
Person p2 = new Person( "darth", 25 );
p2.setLikes( "cheddar" );
FactHandle fh2 = ksession.insert( p2 ); // creates activation.
Person p3 = new Person( "darth", 30 );
p3.setLikes( "brie" );
FactHandle fh3 = ksession.insert( p3 );
ksession.fireAllRules();
// selects p1 and p3
assertEquals( 2,