@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.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_USER_SUPPLIED_IDS)
public void shouldLoadEdgesIncrementallyWithSuppliedIdentifierThrowOnExistingEdge() {
final BatchGraph graph = BatchGraph.build(g)
.incrementalLoading(true, Exists.IGNORE, Exists.THROW)
.vertexIdKey("name")
.bufferSize(1).create();
final Vertex v2 = graph.addVertex(T.id, "marko", "age", 29);
final Vertex v1 = graph.addVertex(T.id, "stephen", "age", 37);
final Object id1 = GraphManager.get().convertId("1");
v1.addEdge("knows", v2, "weight", 1.0d, T.id, id1);
try {
v1.addEdge("knows", v2, "weight", 0.5d, T.id, id1); // second edge is overwrites properties of the first
fail("Should have thrown an error because the vertex already exists");