@Test
public void testMergeWithOverlap() {

    DependencyGraph graph = DependencyGraphFactory.createGraph();
    GraphReaderWriter.merge(graph, "src/test/resources/graphs/testGraph1.json");
    assertThat(graph.getAllNodes()).hasSize(5);
    assertThat(graph.getNode("v1").getProperty("list-key-1")).isEqualTo(Lists.newArrayList("a", "b", "c"));
    assertThat(graph.getNode("v1").getProperty("KEY")).isEqualTo(5);
    // look into graph3:
    DependencyGraph graph3 = DependencyGraphFactory.createGraph();
    GraphReaderWriter.merge(graph3, "src/test/resources/graphs/testGraph3.json");
    assertThat(graph3.getAllNodes()).hasSize(2);
    assertThat(graph3.getNode("v1")).isNotNull();
    assertThat(graph3.getNode("v1").getProperty("list-key-1")).isEqualTo(Lists.newArrayList("c", "d"));
    assertThat(graph3.getNode("v6")).isNotNull();
    assertThat(graph3.getNode("v1").getProperty("KEY")).isEqualTo(6);
    // now merge graph 3 into graph 1:
    GraphReaderWriter.merge(graph, "src/test/resources/graphs/testGraph3.json");
    assertThat(graph.getAllNodes()).hasSize(6);
    assertThat(graph.getNode("v1").getProperty("list-key-1")).isEqualTo(Lists.newArrayList("a", "b", "c", "d"));
    assertThat(graph.getNode("v1").getProperty("KEY")).isEqualTo(Lists.newArrayList(5, 6));
}