/**
* Another convenience method that tests node removal
*/
public void testNodeConvenienceNodeRemoval() {
// this fqn is relative, but since it is from the root it may as well be absolute
Fqn fqn = Fqn.fromString("/test/fqn");
cache.getRoot().addChild(fqn);
assertTrue(cache.getRoot().hasChild(fqn));
assertEquals(true, cache.removeNode(fqn));
assertFalse(cache.getRoot().hasChild(fqn));
// remove should REALLY remove though and not just mark as deleted/invalid.
Node n = cache.getNode(fqn);
assert n == null;
assertEquals(false, cache.removeNode(fqn));
// remove should REALLY remove though and not just mark as deleted/invalid.
n = cache.getNode(fqn);
assert n == null;
// Check that it's removed if it has a child
Fqn child = Fqn.fromString("/test/fqn/child");
log.error("TEST: Adding child " + child);
cache.getRoot().addChild(child);
assertStructure(cache, "/test/fqn/child");
assertEquals(true, cache.removeNode(fqn));