workingMemory );
final List asserted = sink.getAsserted();
assertEquals( 1,
asserted.size() );
Tuple tuple = (Tuple) ((Object[]) asserted.get( 0 ))[0];
assertSame( person2,
tuple.toFactHandles()[0].getObject() );
assertSame( cheese1,
tuple.toFactHandles()[1].getObject() );
cheese2.setType( "stilton" );
final Person person3 = new Person( "xxx2",
30 );
final FactHandle person3Handle = workingMemory.insert( person3 );
final LeftTuple tuple3 = new LeftTupleImpl( (DefaultFactHandle) person3Handle,
from,
true );
from.assertLeftTuple( tuple3,
context,
workingMemory );
assertEquals( 3,
asserted.size() );
tuple = (Tuple) ((Object[]) asserted.get( 1 ))[0];
assertSame( person3,
tuple.toFactHandles()[0].getObject() );
assertSame( cheese1,
tuple.toFactHandles()[1].getObject() );
tuple = (Tuple) ((Object[]) asserted.get( 2 ))[0];
assertSame( person3,
tuple.toFactHandles()[0].getObject() );
assertSame( cheese2,
tuple.toFactHandles()[1].getObject() );
assertNotSame( cheese1,
cheese2 );
}