@Then("the traversal will raise an error with message {word} text of {string}")
    public void theTraversalWillRaiseAnErrorWithMessage(final String comparison, final String expectedMessage) {
        assertNotNull(error);

        // delegate error message assertion completely to the provider. if they choose to handle on their own then
        // skip the default assertions
        if (!world.handleErrorMessageAssertion(comparison, expectedMessage, error)) {
            switch (comparison) {
                case "containing":
                    assertThat(error.getMessage(), containsStringIgnoringCase(expectedMessage));
                    break;
                case "starting":
                    assertThat(error.getMessage(), startsWithIgnoringCase(expectedMessage));
                    break;
                case "ending":
                    assertThat(error.getMessage(), endsWithIgnoringCase(expectedMessage));
                    break;
                default:
                    throw new IllegalStateException(String.format(
                            "Unknown comparison of %s - must be one of: containing, starting or ending", comparison));
            }
        }

        // consume the error now that it has been asserted
        error = null;
    }
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