"end\n";
KnowledgeBase kbase = loadKnowledgeBaseFromString( drl );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Message m1 = new Message( "msg1" );
ksession.insert(m1);
assertEquals(2, ksession.fireAllRules());
Message m2 = (Message) ksession.getGlobal( "m2" );
assertEquals( "msg1", m1.getMessage() );
assertEquals( "msg2", m1.getMessage2() );
assertEquals( "msg3", m1.getMessage3() );
assertEquals( "msg1", m2.getMessage() );
assertEquals( "Two", m2.getMessage2() ); // r1 does not fire for m2
assertEquals( "Three", m2.getMessage3() );
}