public final <T extends BeanVertex> T createAdjacentVertex( BeanVertex from, Class<T> beanClass, String edgeLabel, String... edgeProperties) { T to = createVertex(beanClass); Edge edge = graph.addEdge(null, from.element(), to.element(), edgeLabel); ElementHelper.setProperties(edge, edgeProperties); return to; }
@Test public void should_set_required_fields() { assertThat(beanVertex.beanGraph()).isSameAs(beanGraph); assertThat(beanVertex.element()).isInstanceOf(Vertex.class); }