@Test
public void testFindDocument() {

	for (boolean absolutePath : new boolean[] { true, false }) {
		String prefix = absolutePath ? "/" : "";
		
		FileFolder f1 = new FileFolder(new Path(prefix + "one"), null);
		FileFolder f2 = new FileFolder(f1, "two", null);
		FileDocument doc = new FileDocument(f2, "three", 1L);
		
		String targetPath = prefix + "one/two/three";
		assertTrue(doc == f1.findTreeNode(new Path(targetPath)));
		
		String wrongPrefix = absolutePath ? "" : "/";
		String wrongPath = wrongPrefix + "one/two/three";
		assertNull(f1.findTreeNode(new Path(wrongPath)));
		
		assertNull(f1.findTreeNode(new Path(prefix + "does/not/exist")));
	}
}