// Put the cache in the map before starting, so if it fails in
// start it can still be destroyed later
caches.put("secretive", cache);
// inject our own message listener and re-wire deps
ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
// cr.unregisterComponent(ChannelMessageListener.class);
cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);
// cr.updateDependencies();
cache.start();
c= UnitTestConfigurationFactory.createConfiguration(CacheMode.REPL_ASYNC);
//c.setClusterName("VersionedTestBase");
c.setReplVersionString(getReplicationVersion());
// Use a long timeout to facilitate setting debugger breakpoints
c.setStateRetrievalTimeout(60000);
CacheSPI recipient = (CacheSPI) new UnitTestCacheFactory<Object, Object>().createCache(c, false, getClass());
//Put the cache in the map before starting, so if it fails in
// start it can still be destroyed later
caches.put("secretive2", recipient);
// inject our own message listener and re-wire deps
cr = TestingUtil.extractComponentRegistry(recipient);
cr.registerComponent(new SecretiveStateCacheMessageListener(), ChannelMessageListener.class);
try
{
recipient.start();
fail("start() should throw an exception");