FramedVertex extends FramedElement { protected void setLinkIn(FramedVertex vertex, String... labels) { unlinkIn(null, labels); if (vertex != null) { linkIn(vertex, labels); } }  JsonObject toJson(); @Override String toString();  }
@Test public void testSetLinkIn(){ String label = "knows"; Person p3 = fg.addVertex(Person.class); Person p4 = fg.addVertex(Person.class); Person p5 = fg.addVertex(Person.class); p4.addEdge(label, p3, Knows.class); Assert.assertTrue("An edge(in) of type " + label + " must exist between vertices", p3.in(label).retain(Lists.newArrayList(p4)).count() > 0); p3.setLinkIn(p5, label); Assert.assertEquals("old " + label + " edge was not removed", 0, p3.in(label).retain(Lists.newArrayList(p4)).count()); Assert.assertEquals(label + " edge was not created", 1, p3.in(label).retain(Lists.newArrayList(p5)).count()); }