assertTrue(cache.exists("/first"));
}
public void testPojoEviction() throws Exception {
Person test = new Person();
test.setName("Ben");
test.setAge(10);
cache.putObject("/first/second/third", test); // stored in cache loader
cache.evict(Fqn.fromString("/first/second/third")); // removes node, because there are no children
addDelay();
assertFalse(cache.exists("/first/second/third"));
assertTrue(cache.exists("/first/second"));
assertTrue(cache.exists("/first"));
Person val = (Person) cache.getObject("/first/second/third"); // should be loaded from cache loader
assertNotNull(val);
// This will use both original the new pojo to get.
assertEquals(test.getName(), val.getName());
assertTrue(cache.exists("/first/second/third"));
assertTrue(cache.exists("/first/second"));
assertTrue(cache.exists("/first"));
}