assertTrue(DistributionTestHelper.isOwner(c3, key));
assertFalse(DistributionTestHelper.isOwner(cm.getCache(cacheName), key));
}
protected void waitUntilBeforeTopologyInstalled(final Cache<?, ?> cache, final CheckPoint checkPoint) {
StateConsumer sc = TestingUtil.extractComponent(cache, StateConsumer.class);
final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(sc);
StateConsumer mockConsumer = mock(StateConsumer.class, withSettings().defaultAnswer(forwardedAnswer));
TestingUtil.replaceComponent(cache, StateConsumer.class, mockConsumer, true);
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
// Wait for main thread to sync up