@Test
    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
    public void shouldAttachToGraph() {
        final Vertex v = g.V(convertToVertexId("josh")).next();
        final ReferenceVertex referenceVertex = ReferenceFactory.detach(v);
        final Vertex attachedV = referenceVertex.attach(Attachable.Method.get(graph));

        assertEquals(v, attachedV);
        assertFalse(attachedV instanceof ReferenceVertex);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexTest.java