@Then("the result should be a tree with a structure of")
    public void theGraphShouldBeATreeWithAStructureOf(final String asciiTree) {
        assertThatNoErrorWasThrown();

        // result should be a tree
        assertThat(result, instanceOf(Tree.class));
        final Tree tree = (Tree) result;

        // empty list is an empty tree
        final List<TreeNode> roots = parseTree(asciiTree);

        // Validate that the tree matches the data in roots
        assertEquals(roots.size(), tree.keySet().size());
        for (TreeNode root : roots) {
            assertThat(String.format("Tree not matching at %s", root.getValue()),
                    tree.containsKey(root.getValue()), CoreMatchers.is(true));
            validateTreeStructure((Tree) tree.get(root.getValue()), root);
        }
    }
Some implementations of {@link VertexProperty} are not {@code Serializable} and may lead to test failures when passed as
parameters. One such instance is {@code HadoopVertexProperty}. This method detaches vertex properties as tests
should never require implementation-specific elements.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java