@Parameterized.Parameters(name = "{0}")
    public static Iterable<Object[]> generateTestParameters() {

        Function<Traverser<Vertex>, Vertex> lambda = Traverser::get; // to ensure same hashCode
        return Arrays.asList(new Traversal[][]{
                {__.outE().inV(), __.out()},
                {__.inE().outV(), __.in()},
                {__.bothE().otherV(), __.both()},
                {__.outE().outV(), __.outE().outV()},
                {__.inE().inV(), __.inE().inV()},
                {__.bothE().bothV(), __.bothE().bothV()},
                {__.bothE().inV(), __.bothE().inV()},
                {__.bothE().outV(), __.bothE().outV()},
                {__.outE().otherV(), __.out()},
                {__.inE().otherV(), __.in()},
                {__.outE().as("a").inV(), __.outE().as("a").inV()}, // todo: this can be optimized, but requires a lot more checks
                {__.outE().inV().path(), __.outE().inV().path()},
                {__.outE().inV().simplePath(), __.outE().inV().simplePath()},
                {__.outE().inV().tree(), __.outE().inV().tree()},
                {__.outE().inV().map(lambda), __.outE().inV().map(lambda)},
                {__.union(__.outE().inV(), __.inE().outV()).path(), __.union(__.outE().inV(), __.inE().outV()).path()},
                {__.as("a").outE().inV().as("b"), __.as("a").out().as("b")}});
    }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/IncidentToAdjacentStrategyTest.java