WaitForPushSingletonStoreCacheLoader scl2 = (WaitForPushSingletonStoreCacheLoader) cache2.getCacheLoaderManager().getCacheLoader();
CountDownLatch startPushLatch = new CountDownLatch(1);
scl2.setStartPushLatch(startPushLatch);
ViewChangeListener viewChangeListener = new ViewChangeListener(cache2);
stopCache1(false);
cache2.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
cache2.getInvocationContext().getOptionOverrides().setSuppressPersistence(true);
cache2.put(fqn("/e/i"), "i-key", "i-value");
startPushLatch.countDown();
viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);
waitForPushStateCompletion(scl2.getPushStateFuture());
assertTrue(cl2.exists(fqn("/a")));
assertTrue(cl2.exists(fqn("/a")));
assertTrue(cl2.exists(fqn("/a/b")));
assertTrue(cl2.exists(fqn("/a/b")));
assertTrue(cl2.exists(fqn("/a/b/c")));
assertTrue(cl2.exists(fqn("/a/b/d")));
assertTrue(cl2.exists(fqn("/e")));
assertTrue(cl2.exists(fqn("/e/f/g")));
assertTrue(cl2.exists(fqn("/e/i")));
assertTrue(cl2.get(fqn("/a")).containsKey("a-key"));
assertTrue(cl2.get(fqn("/a")).containsKey("aa-key"));
assertTrue(cl2.get(fqn("/a/b")).containsKey("b-key"));
assertTrue(cl2.get(fqn("/a/b")).containsKey("bb-key"));
assertTrue(cl2.get(fqn("/a/b/c")).containsKey("c-key"));
assertTrue(cl2.get(fqn("/a/b/d")).containsKey("d-key"));
assertTrue(cl2.get(fqn("/e")).containsKey("e-key"));
assertTrue(cl2.get(fqn("/e/f/g")).containsKey("g-key"));
assertTrue(cl2.get(fqn("/e/i")).containsKey("i-key"));
cache2.put(fqn("/e/f/h"), "h-key", "h-value");
cache3.put(fqn("/i"), "i-key", "i-value");
assertTrue(cl2.get(fqn("/e/f/h")).containsKey("h-key"));
assertTrue(cl2.get(fqn("/i")).containsKey("i-key"));
assertTrue(cl3.exists(fqn("/a")));
assertTrue(cl3.exists(fqn("/a")));
assertTrue(cl3.exists(fqn("/a/b")));
assertTrue(cl3.exists(fqn("/a/b")));
assertTrue(cl3.exists(fqn("/a/b/c")));
assertTrue(cl3.exists(fqn("/a/b/d")));
assertTrue(cl3.exists(fqn("/e")));
assertTrue(cl3.exists(fqn("/e/f/g")));
assertTrue(cl3.exists(fqn("/e/f/h")));
assertTrue(cl3.exists(fqn("/i")));
viewChangeListener = new ViewChangeListener(cache3);
stopCache2(false);
viewChangeListener.waitForViewChange(60, TimeUnit.SECONDS);
SingletonStoreCacheLoader scl3 = (SingletonStoreCacheLoader) cache3.getCacheLoaderManager().getCacheLoader();
waitForPushStateCompletion(scl3.getPushStateFuture());
assertTrue(cl3.get(fqn("/a")).containsKey("a-key"));