* This just test AlphaNode With a different Constraint type.
*/
@Test
public void testReturnValueConstraintAssertObject() throws Exception {
ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
BuildContext buildContext = new BuildContext( ruleBase,
((ReteooRuleBase) ruleBase).getReteooBuilder().getIdGenerator() );
AbstractWorkingMemory workingMemory = (AbstractWorkingMemory) ruleBase.newStatefulSession();
final Rule rule = new Rule( "test-rule" );
PropagationContextFactory pctxFactory = ruleBase.getConfiguration().getComponentFactory().getPropagationContextFactory();
final PropagationContext context = pctxFactory.createPropagationContext(0, PropagationContext.INSERTION, null, null, null);
final MockObjectSource source = new MockObjectSource( buildContext.getNextId() );
final InternalReadAccessor extractor = store.getReader( Cheese.class,
"type",
getClass().getClassLoader() );
final FieldValue field = FieldFactory.getInstance().getFieldValue( "cheddar" );
final MvelConstraint constraint = new MvelConstraintTestUtil("type == \"cheddar\"", field, extractor);
final AlphaNode alphaNode = new AlphaNode( buildContext.getNextId(),
constraint,
source,
buildContext );
final MockObjectSink sink = new MockObjectSink();
alphaNode.addObjectSink( sink );