final Cheese cheese1 = new Cheese( "c",
1 );
final Cheese cheese2 = new Cheese( cheese1.getType(),
1 );
final FactHandle h1 = session.insert( cheese1 );
session.fireAllRules();
Collection< ? > list = session.getObjects( new ClassObjectFilter( cheese1.getType().getClass() ) );
assertEquals( 1,
list.size() );
// probably dangerous, as contains works with equals, not identity
assertEquals( cheese1.getType(),
list.iterator().next() );
// FactHandle ht = workingMemory.getFactHandle(c1.getType());
final FactHandle h2 = session.insert( cheese2 );
session.fireAllRules();
list = session.getObjects( new ClassObjectFilter( cheese1.getType().getClass() ) );
assertEquals( 1,
list.size() );
assertEquals( cheese1.getType(),