@Test
public void testGetEdge() {

    GraphStore graphStore = GraphGenerator.generateSmallGraphStore();
    GraphViewStore store = graphStore.viewStore;
    GraphViewImpl view = store.createView();
    addSomeElements(graphStore, view);
    DirectedSubgraph graph = store.getDirectedGraph(view);
    for (Edge e : graph.getEdges()) {
        Assert.assertSame(graph.getEdge(e.getSource(), e.getTarget()), e);
    }
    graph.clearEdges();
    Node[] nodes = graph.getNodes().toArray();
    Assert.assertNull(graph.getEdge(nodes[0], nodes[1]));
}