KnowledgeBaseConfiguration kconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kconf.setOption( EventProcessingOption.STREAM );
KnowledgeBase kbase = loadKnowledgeBase( "test_EventExpirationSetToZero.drl",
kconf );
KnowledgeSessionConfiguration ksessionConfig = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
ksessionConfig.setOption( ClockTypeOption.get( "pseudo" ) );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession( ksessionConfig,
null );
WorkingMemoryEventListener wml = mock( WorkingMemoryEventListener.class );
ksession.addEventListener( wml );