@Test
    public void shouldOnlyAllowVertexFilterToTraverseVertex() {
        GraphFilter graphFilter = new GraphFilter();
        graphFilter.setVertexFilter(__.hasLabel("person"));
        try {
            graphFilter.setVertexFilter(__.<Vertex>as("a").outE().<Vertex>select("a"));
            fail("Should not allow traversals to the incident edges");
        } catch (final IllegalArgumentException e) {
            assertEquals(e.getMessage(), GraphComputer.Exceptions.vertexFilterAccessesIncidentEdges(__.<Vertex>as("a").outE().<Vertex>select("a")).getMessage());
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/computer/GraphFilterTest.java