FramedVertex extends FramedElement { protected VertexTraversal<?, ?, ?> both(final int branchFactor, final String... labels) { return new TraversalImpl(graph(), this).castToVertices().both(branchFactor, labels); }  JsonObject toJson(); @Override String toString();  }
@Test public void testBoth() { Assert.assertEquals(p2, p1.both().next(Person.class)); Assert.assertEquals(p2, p1.both(1).next(Person.class)); Assert.assertEquals(p1, p2.both().next(Person.class)); Assert.assertEquals(p1, p2.both(1).next(Person.class)); }