@Test
    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
    public void shouldAttachToVertex() {
        final Vertex toDetach = g.V(convertToVertexId("josh")).next();
        final DetachedVertex detachedVertex = DetachedFactory.detach(toDetach, true);
        final Vertex attached = detachedVertex.attach(Attachable.Method.get(toDetach));

        assertEquals(toDetach, attached);
        assertFalse(attached instanceof DetachedVertex);
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexTest.java