@Test
    public void testPrettyPrintNestedTree() {
        final Tree<String> tree = new Tree<>();
        final Tree<String> child1 = new Tree<>();
        final Tree<String> grandchild = new Tree<>();
        tree.put("root", new Tree<>());
        tree.get("root").put("child1", child1);
        tree.get("root").get("child1").put("grandchild", grandchild);

        final String expected = "|--root" + System.lineSeparator() +
                                "   |--child1" + System.lineSeparator() +
                                "      |--grandchild";
        assertEquals(expected, tree.prettyPrint());
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/TreeTest.java