@Test
    @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
    public void shouldIteratePropertiesOnDetached() {
        final Vertex v = graph.addVertex("name", "daniel", "favoriteColor", "red", "state", "happy");
        final Vertex detached = DetachedFactory.detach(v, true);
        assertEquals("daniel", detached.properties("name").next().value());
        detached.properties().forEachRemaining(p -> {
            if (p.key().equals("name"))
                assertEquals("daniel", p.value());
            else if (p.key().equals("favoriteColor"))
                assertEquals("red", p.value());
            else if (p.key().equals("state"))
                assertEquals("happy", p.value());
            else
                fail("Should be one of the expected keys");
        });
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexTest.java