@FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
@FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = Graph.Features.EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
public void shouldLoadVerticesIncrementallyWithSuppliedIdentifierOverwriteExistingVertex() {
final BatchGraph graph = BatchGraph.build(g)
.incrementalLoading(true, Exists.OVERWRITE, Exists.IGNORE)
.bufferSize(1).create();
final Object id1 = GraphManager.get().convertId("1");
final Object id2 = GraphManager.get().convertId("2");
graph.addVertex(T.id, id1, "name", "marko", "age", 29);
final Vertex v1 = graph.addVertex(T.id, id2, "name", "stephen", "age", 37);
final Vertex v2 = graph.addVertex(T.id, id1, "name", "marko", "age", 34);
v1.addEdge("knows", v2, "weight", 1.0d);
tryCommit(graph);
final Vertex vStephen = g.V().<Vertex>has("name", "stephen").next();
assertEquals(37, vStephen.property("age").value());