SessionPseudoClock clock = (SessionPseudoClock) wm.getSessionClock();
clock.advanceTime( 10,
TimeUnit.SECONDS );
StockTickInterface st1O = new StockTick( 1,
"DROO",
100,
clock.getCurrentTime() );
EventFactHandle st1 = (EventFactHandle) wm.insert( st1O );
wm.fireAllRules();
// should not fire, because it must wait 10 seconds
assertEquals( 0,
results.size() );
clock.advanceTime( 5,
TimeUnit.SECONDS );
EventFactHandle st2 = (EventFactHandle) wm.insert( new StockTick( 1,
"DROO",
80,
clock.getCurrentTime() ) );
wm.fireAllRules();