}
public void testCrawlUp() throws Exception {
String text = "Look Pa, some more!";
ModifiableTraversableSource src = (ModifiableTraversableSource)resolver.resolveURI("jcr://path/to/very/deep/content");
write(src, text);
// Do a fresh lookup
src = (ModifiableTraversableSource)resolver.resolveURI("jcr://path/to/very/deep/content");
ModifiableTraversableSource parent = (ModifiableTraversableSource)src.getParent();
assertTrue(parent.exists());
assertEquals("jcr://path/to/very/deep", parent.getURI());
parent = (ModifiableTraversableSource)parent.getParent();
assertTrue(parent.exists());
assertEquals("jcr://path/to/very", parent.getURI());
parent = (ModifiableTraversableSource)parent.getParent();
assertTrue(parent.exists());
assertEquals("jcr://path/to", parent.getURI());
parent = (ModifiableTraversableSource)parent.getParent();
assertTrue(parent.exists());
assertEquals("jcr://path", parent.getURI());
parent = (ModifiableTraversableSource)parent.getParent();
assertTrue(parent.exists());
assertEquals("jcr://", parent.getURI());
// Root node has no parent
parent = (ModifiableTraversableSource)parent.getParent();
assertNull(parent);
}