// now attach a mock notifier
CacheManagerNotifierWrapper nw = new CacheManagerNotifierWrapper(TestingUtil.extractComponent(cm1.getCache("cache"), CacheManagerNotifier.class));
CacheManagerNotifier origNotifier = TestingUtil.replaceComponent(cm1, CacheManagerNotifier.class, nw, true);
try {
// start a second cache.
Cache c2 = cm2.getCache("cache");
TestingUtil.blockUntilViewsReceived(60000, cm1, cm2);
assert nw.notifyView;
assertEquals(myAddress, nw.address);
} finally {
TestingUtil.replaceComponent(cm1, CacheManagerNotifier.class, origNotifier, true);