@Test
    public void shouldProvideValidDepths() {
        Tree<String> tree = new Tree<String>();
        tree.put("marko", new Tree<String>(TreeTest.createTree("a", new Tree<String>("a1", "a2")), TreeTest.createTree("b", new Tree<String>("b1", "b2", "b3"))));
        tree.put("josh", new Tree<String>("1", "2"));

        assertEquals(0, tree.getObjectsAtDepth(0).size());
        assertEquals(2, tree.getObjectsAtDepth(1).size());
        assertEquals(4, tree.getObjectsAtDepth(2).size());
        assertEquals(5, tree.getObjectsAtDepth(3).size());
        assertEquals(0, tree.getObjectsAtDepth(4).size());
        assertEquals(0, tree.getObjectsAtDepth(5).size());

        assertEquals(2, tree.get("josh").size());
        assertEquals(0, tree.get("marko").get("b").get("b1").size());
        assertEquals(3, tree.get("marko").get("b").size());
        assertNull(tree.get("marko").get("c"));
    }
@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