@Test
public void testMutableObject() {
// create a RuleBase with a single ObjectTypeNode we attach a
// MockObjectSink so we can detect assertions and retractions
final RuleImpl rule1 = new RuleImpl( "test-rule1" );
IdGenerator idGenerator = kBase.getReteooBuilder().getIdGenerator();
final Rete rete = kBase.getRete();
final ObjectTypeNode objectTypeNode = new ObjectTypeNode( idGenerator.getNextId(),
this.entryPoint,
new ClassObjectType( String.class ),
buildContext );
objectTypeNode.attach( buildContext );
final MockObjectSink sink = new MockObjectSink();
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( idGenerator.getNextId(),
new MockTupleSource( idGenerator.getNextId() ),
rule1,
rule1.getLhs(),
0,
buildContext );
StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kBase.newStatefulKnowledgeSession();