// read in the source
KieBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
conf.setOption( EventProcessingOption.STREAM );
final KnowledgeBase kbase = loadKnowledgeBase( conf, "test_CEP_EventExpiration3.drl" );
final TimeIntervalParser parser = new TimeIntervalParser();
Map<ObjectType, ObjectTypeNode> objectTypeNodes = ((KnowledgeBaseImpl)kbase).getRete().getObjectTypeNodes( EntryPointId.DEFAULT );
ObjectTypeNode node = objectTypeNodes.get( new ClassObjectType( StockTick.class ) );
assertNotNull( node );
// the expiration policy @expires(10m) should override the temporal operator usage
assertEquals( parser.parse( "10m" )[0].longValue() + 1,
node.getExpirationOffset() );
}