@Test public void addGraph_overlap() { UndirectedGraph<Integer, String> graph = Graphs.createUndirected(immutableGraph.config()); populateInputGraph(graph); // Add an edge that is in 'graph' (overlap) builder.addEdge(E12, N1, N2); builder.addGraph(graph); assertThat(builder.build()).isEqualTo(graph); }
@Override public ImmutableUndirectedGraph<Integer, String> createGraph() { builder = ImmutableUndirectedGraph.builder(Graphs.config().noSelfLoops()); return builder.build(); }