@Test
public void testSimpleExpression() {
StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newKieSession();
final Person p = new Person( "mark",
"",
31 );
final InternalFactHandle f0 = (InternalFactHandle) ksession.insert( p );
final LeftTupleImpl tuple = new LeftTupleImpl( f0,
null,
true );
RuleTerminalNode rtn = new RuleTerminalNode();
rtn.setSalienceDeclarations( context.getDeclarationResolver().getDeclarations( context.getRule() ).values().toArray( new Declaration[1] ) );
AgendaItem item = new AgendaItemImpl(0, tuple, 0, null, rtn, null);
assertEquals( 25,
context.getRule().getSalience().getValue( new DefaultKnowledgeHelper( item, ksession ),
context.getRule(),
ksession ) );
}