listener = new TestListener();
cache = createCacheWithListener(listener);
ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
CommandInterceptor interceptor = new OptimisticCreateIfNotExistsInterceptor();
cr.registerComponent(interceptor, OptimisticCreateIfNotExistsInterceptor.class);
CommandInterceptor nodeInterceptor = new OptimisticNodeInterceptor();
cr.registerComponent(nodeInterceptor, OptimisticNodeInterceptor.class);
dummy = new MockInterceptor();
cr.registerComponent(dummy, MockInterceptor.class);
interceptor.setNext(nodeInterceptor);
nodeInterceptor.setNext(dummy);
TestingUtil.replaceInterceptorChain(cache, interceptor);
mgr = cache.getConfiguration().getRuntimeConfig().getTransactionManager();