@Test
    public void shouldThrowIfKeyIsEmpty() {
        try {
            GraphVariableHelper.validateVariable("", "test");
            fail("Should have thrown an exception when key is empty");
        } catch (Exception iae) {
            final Exception expected = Graph.Variables.Exceptions.variableKeyCanNotBeEmpty();
            assertEquals(expected.getClass(), iae.getClass());
            assertEquals(expected.getMessage(), iae.getMessage());
        }
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/util/GraphVariableHelperTest.java