@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);
    //Make sure old edge was deleted
    Assert.assertEquals("old " + label + " edge was not removed", 0, p3.in(label).retain(Lists.newArrayList(p4)).count());
    //Make sure a new edge was created (and to correct vertex)
    Assert.assertEquals(label + " edge was not created", 1, p3.in(label).retain(Lists.newArrayList(p5)).count());
}