private Edge getEdge(final Object id1, final Object id2) {
        return g.V(id1)
                .bothE().filter(__.otherV().hasId(id2))
                .next();
    }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/search/path/ShortestPathTestHelper.java