rule.setTimer( new DurationTimer( 10000 ) );
rule.setPackage( "test" );
impl.pkg.addRule( rule );
knowledgeBase.addKnowledgePackages( Collections.singleton( (KnowledgePackage) impl ) );
SessionConfiguration config = new SessionConfiguration();
config.setClockType( ClockType.PSEUDO_CLOCK );
StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession( config, KnowledgeBaseFactory.newEnvironment() );
PseudoClockScheduler scheduler = (PseudoClockScheduler) ksession.<SessionClock> getSessionClock();
Marshaller marshaller = MarshallerFactory.newMarshaller( knowledgeBase );