@Test
    @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
    public void shouldGenerateDefaultIdOnAddVWithGeneratedCustomId() throws Exception {
        final AtomicBoolean first = new AtomicBoolean(false);
        final ElementIdStrategy strategy = ElementIdStrategy.build().idMaker(() -> {
            final String key = first.get() ? "xxx" : "yyy";
            first.set(true);
            return key;
        }).create();
        final GraphTraversalSource sg = create(strategy);
        sg.addV().next();
        assertEquals(1, IteratorUtils.count(sg.V()));

        final Vertex v = sg.V().addV().property("name", "stephen").next();
        assertEquals("stephen", v.value("name"));
        assertEquals("xxx", sg.V(v).id().next());
        assertEquals("xxx", sg.V("xxx").id().next());
        assertEquals("yyy", sg.V("yyy").id().next());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategyProcessTest.java