Environment env = createEnvironment(context);
KnowledgeBase kbase = initializeKnowledgeBase(simpleRule);
StatefulKnowledgeSession ksession = InfinispanKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
ksession.addEventListener(new DefaultAgendaEventListener());
ksession.addEventListener(new DefaultRuleRuntimeEventListener());
assertEquals(1, ksession.getRuleRuntimeEventListeners().size());
assertEquals(1, ksession.getAgendaEventListeners().size());
ksession = InfinispanKnowledgeService.loadStatefulKnowledgeSession(ksession.getId(), kbase, null, env);