void () { TreePath path = TreePathUtil.convertArrayToTreePath("one", "two", "three", "four", "five"); Assert.assertEquals( TreePathUtil.convertArrayToTreePath("one", "two"), TreePathUtil.findAncestor(path, ancestor -> ancestor.getPathCount() == 2)); }