@SuppressWarnings("unchecked")
public void testNodeConvenienceNodeRemoval()
{
Cache<Object, Object>[] caches = cachesTL.get();
// this fqn is relative, but since it is from the root it may as well be absolute
Fqn fqn = Fqn.fromString("/test/fqn");
caches[0].getRoot().addChild(fqn);
assertTrue(caches[0].getRoot().hasChild(fqn));
assertTrue(caches[1].getRoot().hasChild(fqn));
assertEquals(true, caches[0].removeNode(fqn));
assertFalse(caches[0].getRoot().hasChild(fqn));
assertFalse(caches[1].getRoot().hasChild(fqn));
assertEquals(false, caches[0].removeNode(fqn));
// Confirm it works as expected if the removed node has a child
Fqn child = Fqn.fromString("/test/fqn/child");
caches[0].getRoot().addChild(child);
assertTrue(caches[0].getRoot().hasChild(child));
assertTrue(caches[1].getRoot().hasChild(child));
assertEquals(true, caches[0].removeNode(fqn));