final Cheese cheddar = new Cheese( "cheddar",
17 );
final FactHandle stiltonHandle = wm.insert( stilton );
ObjectInsertedEvent oae = (ObjectInsertedEvent) wmList.get( 0 );
assertSame( stiltonHandle,
oae.getFactHandle() );
wm.update( stiltonHandle,
cheddar );
final ObjectUpdatedEvent ome = (ObjectUpdatedEvent) wmList.get( 1 );
assertSame( stiltonHandle,
ome.getFactHandle() );
assertEquals( cheddar, ome.getObject() );
assertEquals( stilton, ome.getOldObject() );
wm.retract( stiltonHandle );
final ObjectRetractedEvent ore = (ObjectRetractedEvent) wmList.get( 2 );
assertSame( stiltonHandle,
ore.getFactHandle() );
final FactHandle cheddarHandle = wm.insert( cheddar );
oae = (ObjectInsertedEvent) wmList.get( 3 );
assertSame( cheddarHandle,
oae.getFactHandle() );
}