@Test
    public void shouldRequirePathsAccordingly() {
        Object[][] traversalPaths = new Object[][]{
                {false, __.where(P.not(P.within("x"))).asAdmin()},
                {true, __.as("x").where(P.not(P.within("x"))).asAdmin()},
                {true, __.as("a").where(P.not(P.within("x"))).asAdmin()},
                {false, __.local(__.where(P.not(P.within("x")))).asAdmin()},
                {true, __.as("x").local(__.where(P.not(P.within("x")))).asAdmin()},
                {false, __.local(__.where(P.not(P.within("x")))).asAdmin()},
        };
        for (final Object[] traversalPath : traversalPaths) {
            assertEquals(traversalPath[0], ((Traversal.Admin<?, ?>) traversalPath[1]).getTraverserRequirements().contains(TraverserRequirement.LABELED_PATH));
        }
    }
@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/filter/WhereStepTest.java