void () { Object root = new Object(); TreePath parent = TreePathUtil.createTreePath(null, root); Assert.assertNotNull(parent); Assert.assertNull(parent.getParentPath()); Assert.assertSame(root, parent.getLastPathComponent()); Object node = new Object(); TreePath path = TreePathUtil.createTreePath(parent, node); Assert.assertNotNull(path); Assert.assertNotNull(path.getParentPath()); Assert.assertNotSame(path, parent); Assert.assertSame(parent, path.getParentPath()); Assert.assertSame(node, path.getLastPathComponent()); }