assertTrue(kstateless.getProcessEventListeners().toArray()[0] instanceof MockProcessEventListener);
}
@Test
public void testStatelessWMEventListener() throws Exception {
StatelessKieSession kstateless = (StatelessKieSession) context.getBean("statelessSession");
assertEquals(1, kstateless.getWorkingMemoryEventListeners().size());
assertTrue(kstateless.getWorkingMemoryEventListeners().toArray()[0] instanceof MockWorkingMemoryEventListener);
kstateless.setGlobal("list", list);
kstateless.execute(new Person());
//this assert to show that our listener was called X number of times.
// once from agenda listener, and second from working memory event listener
assertEquals(2, counterFromListener);
}