@Test
        @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
        @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_REMOVE_EDGES)
        public void shouldNotHaveAConcurrentModificationExceptionWhenIteratingAndRemovingAddingEdges() {
            final Vertex v1 = graph.addVertex("name", "marko");
            final Vertex v2 = graph.addVertex("name", "puppy");
            v1.addEdge("knows", v2, "since", 2010);
            v1.addEdge("pets", v2);
            v1.addEdge("walks", v2, "location", "arroyo");
            v2.addEdge("knows", v1, "since", 2010);
            assertEquals(4l, IteratorUtils.count(v1.edges(Direction.BOTH)));
            assertEquals(4l, IteratorUtils.count(v2.edges(Direction.BOTH)));
            v1.edges(Direction.BOTH).forEachRemaining(edge -> {
                v1.addEdge("livesWith", v2);
                v1.addEdge("walks", v2, "location", "river");
                edge.remove();
            });
            //assertEquals(8, v1.outE().count().next().intValue());  TODO: Neo4j is not happy
            //assertEquals(8, v2.outE().count().next().intValue());
            v1.edges(Direction.BOTH).forEachRemaining(Edge::remove);
            assertEquals(0, IteratorUtils.count(v1.edges(Direction.BOTH)));
            assertEquals(0, IteratorUtils.count(v2.edges(Direction.BOTH)));
        }
@author Stephen Mallette (http://stephen.genoprime.com)
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/EdgeTest.java