MyFastLocalHandler localHandler2 = new MyFastLocalHandler();
eventCartridge.addEventHandler(localHandler);
eventCartridge.addEventHandler(localHandler2);
// cloned instance
EventCartridge ecruntime = eventCartridge.getRuntimeInstance();
assertNotSame(eventCartridge, ecruntime);
Iterator<?> i = ecruntime.getReferenceInsertionEventHandlers();
// 1. same as handler
assertSame(handler, i.next());
// 2. cloned localHandler
MyLocalHandler newLocalHandler = (MyLocalHandler) i.next();
assertNotNull(newLocalHandler);
assertNotSame(localHandler, newLocalHandler);
// 3. fast cloned localHandler
MyFastLocalHandler newLocalHandler2 = (MyFastLocalHandler) i.next();
assertNotNull(newLocalHandler2);
assertNotSame(localHandler2, newLocalHandler2);
assertFalse(i.hasNext());
// other handlers
i = ecruntime.getMethodExceptionEventHandlers();
// same as newLocalHandler
assertSame(newLocalHandler, i.next());
// same as newLocalHandler