@Test
    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
    @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
    public void shouldCreateVertex() {
        final DetachedVertex detachedVertex = new DetachedVertex(23, "dog", Collections.emptyMap());
        detachedVertex.attach(Attachable.Method.create(graph));
        assertEquals(7, IteratorUtils.count(graph.vertices()));
        final AtomicInteger dogTimes = new AtomicInteger(0);
        graph.vertices().forEachRemaining(vertex -> {
            if (vertex.label().equals("dog")) {
                dogTimes.incrementAndGet();
            }
        });
        assertEquals(1, dogTimes.get());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexTest.java