any(FlagAffectedCommand.class));
TestingUtil.replaceComponent(cache, CacheNotifier.class, mockNotifier, true);
}
protected void waitUntilRequestingListeners(final Cache<?, ?> cache, final CheckPoint checkPoint) {
StateProvider sp = TestingUtil.extractComponent(cache, StateProvider.class);
final Answer<Object> forwardedAnswer = AdditionalAnswers.delegatesTo(sp);
StateProvider mockProvider = mock(StateProvider.class, withSettings().defaultAnswer(forwardedAnswer));
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
// Wait for main thread to sync up
checkPoint.trigger("pre_cluster_listeners_invoked_" + cache);