when( constraint.isAllowedCachedLeft( any( ContextEntry.class ), any( InternalFactHandle.class ) )).thenReturn(true);
when( constraint.isAllowedCachedRight( any( LeftTupleImpl.class ), any( ContextEntry.class ) )).thenReturn(true);
try {
// assert tuple
final Cheese cheddar = new Cheese( "cheddar",
10 );
final DefaultFactHandle f0 = (DefaultFactHandle) this.workingMemory.insert( cheddar );
final LeftTupleImpl tuple1 = new LeftTupleImpl( f0,
this.node,
true );
this.node.assertLeftTuple( tuple1,
this.context,
this.workingMemory );
// assert will match, so propagated tuple should be retracted
final Cheese brie = new Cheese( "brie",
10 );
final DefaultFactHandle f1 = (DefaultFactHandle) this.workingMemory.insert( brie );
// Initially, no objects in right memory
assertEquals( 0,