" @duration( getProperties().get( 'duration' )+1 ) \n" +
"end\n";
KnowledgeBase kbase = loadKnowledgeBaseFromString( rule );
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
Message msg = new Message();
Properties props = new Properties();
props.put("timestamp",
new Integer(99));
props.put( "duration",
new Integer( 52 ) );
msg.setProperties(props);
EventFactHandle efh = (EventFactHandle) ksession.insert( msg );
assertEquals( 98,
efh.getStartTimestamp() );
assertEquals( 53,