"then\n" +
" anyList.add(\"1\");\n" +
"end\n";
KnowledgeBase kbase = loadKnowledgeBaseFromString(str);
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
List<String> allList = new ArrayList<String>();
ksession.setGlobal("allList", allList);
List<String> anyList = new ArrayList<String>();
ksession.setGlobal("anyList", anyList);
ksession.insert(new Strings("1", "2", "3"));
ksession.insert(new Strings("2", "3"));
ksession.fireAllRules();
assertEquals(1, allList.size());
assertEquals(2, anyList.size());
}