StatefulKnowledgeSession ksession = kagent.getKnowledgeBase().newStatefulKnowledgeSession();
List<String> list = new ArrayList<String>();
ksession.setGlobal( "list",
list );
ksession.fireAllRules();
ksession.dispose();
assertEquals( 2,
list.size() );
assertTrue( list.contains( "rule1" ) );
assertTrue( list.contains( "rule2" ) );