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

        // either can be expected since Tree doesn't maintain node order
        final String expected1 = "|--root" + System.lineSeparator() +
                                 "   |--child1" + System.lineSeparator() +
                                 "   |--child2";
        final String expected2 = "|--root" + System.lineSeparator() +
                                 "   |--child2" + System.lineSeparator() +
                                 "   |--child1";
        assertThat(tree.prettyPrint(), Matchers.anyOf(Matchers.is(expected1), Matchers.is(expected2)));
    }
@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