@Test
public void testIntersection() {

    GraphStore graphStore = GraphGenerator.generateTinyGraphStore();
    GraphViewStore store = graphStore.viewStore;
    GraphViewImpl view1 = store.createView();
    GraphViewImpl view2 = store.createView();
    DirectedSubgraph graph1 = store.getDirectedGraph(view1);
    DirectedSubgraph graph2 = store.getDirectedGraph(view2);
    Node n1 = graphStore.getNode("1");
    Node n2 = graphStore.getNode("2");
    graph1.addNode(n1);
    graph1.addNode(n2);
    graph2.addNode(n2);
    graph1.intersection(graph2);
    Assert.assertFalse(graph1.contains(n1));
    Assert.assertTrue(graph1.contains(n2));
}