public void testGetChildren10Passivation() throws Exception
{
CacheSPI<Object, Object> cache = cacheTL.get();
CacheLoader loader = loaderTL.get();
cache.put("/a/1", null);
cache.put("/a/2", null);
cache.put("/a/3", null);
cache.evict(Fqn.fromString("/a/1"));// passivate node
cache.evict(Fqn.fromString("/a/2"));// passivate node
cache.evict(Fqn.fromString("/a/3"));// passivate node
cache.evict(Fqn.fromString("/a"));// passivate node
addDelay();
assertTrue(loader.exists(Fqn.fromString("/a")));
assertNull(cache.get("/a", "test"));// load attributes from loader
// don't remove from loader though since children may be present
assertTrue(loader.exists(Fqn.fromString("/a")));
cache.get("/a/1", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/1")));
cache.get("/a/2", "test");// activate node
assertFalse(loader.exists(Fqn.fromString("/a/2")));
cache.get("/a/3", "test");// passivate node
assertFalse(loader.exists(Fqn.fromString("/a/3")));
Set children = cache.getNode("/a").getChildrenNames();
assertNotNull("No children were loaded", children);
System.out.println("children: " + children);
assertEquals("3 children weren't loaded", 3, children.size());
assertNull(cache.get("/a", "test"));// activate node
assertFalse(loader.exists(Fqn.fromString("/a")));
}