@Test
        @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
        @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_REMOVE_VERTICES)
        public void shouldRemoveMultiPropertiesWhenVerticesAreRemoved() {
            final Vertex marko = graph.addVertex("name", "marko", "name", "okram");
            final Vertex stephen = graph.addVertex("name", "stephen", "name", "spmallette");
            tryCommit(graph, graph -> {
                assertVertexEdgeCounts(graph, 2, 0);
                assertEquals(2, IteratorUtils.count(marko.properties("name")));
                assertEquals(2, IteratorUtils.count(stephen.properties("name")));
                assertEquals(2, IteratorUtils.count(marko.properties()));
                assertEquals(2, IteratorUtils.count(stephen.properties()));
                assertEquals(0, IteratorUtils.count(marko.properties("blah")));
                assertEquals(0, IteratorUtils.count(stephen.properties("blah")));
            });

            final Vertex marko2 = graph.vertices(marko.id()).next();
            final Vertex stephen2 = graph.vertices(stephen.id()).next();
            stephen2.remove();
            tryCommit(graph, graph -> {
                assertVertexEdgeCounts(graph, 1, 0);
                assertEquals(2, IteratorUtils.count(marko2.properties("name")));
                assertEquals(2, IteratorUtils.count(marko2.properties()));
                assertEquals(0, IteratorUtils.count(marko2.properties("blah")));
            });

            final Vertex marko3 = graph.vertices(marko.id()).next();
            for (int i = 0; i < 100; i++) {
                marko3.property(VertexProperty.Cardinality.list, "name", "Remove-" + String.valueOf(i));
            }
            tryCommit(graph, graph -> {
                assertVertexEdgeCounts(graph, 1, 0);
                assertEquals(102, IteratorUtils.count(marko3.properties("name")));
                assertEquals(102, IteratorUtils.count(marko3.properties()));
                assertEquals(0, IteratorUtils.count(marko3.properties("blah")));
            });

            g.V().properties("name").has(T.value, P.test((a, b) -> ((String) a).startsWith((String) b), "Remove-")).forEachRemaining(Property::remove);
            final Vertex marko4 = graph.vertices(marko.id()).next();
            tryCommit(graph, graph -> {
                assertVertexEdgeCounts(graph, 1, 0);
                assertEquals(2, IteratorUtils.count(marko4.properties("name")));
                assertEquals(2, IteratorUtils.count(marko4.properties()));
                assertEquals(0, IteratorUtils.count(marko4.properties("blah")));
            });
            marko4.remove();
            tryCommit(graph, getAssertVertexEdgeCounts(0, 0));
        }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexPropertyTest.java