@Test
public void testIsSelfLoop() {

    GraphStore graphStore = GraphGenerator.generateTinyGraphStore();
    NodeImpl n1 = graphStore.getNode("1");
    Edge edge = graphStore.factory.newEdge("edge", n1, n1, EdgeTypeStore.NULL_LABEL, 1.0, true);
    graphStore.addEdge(edge);
    GraphViewStore store = graphStore.viewStore;
    GraphViewImpl view = store.createView();
    view.fill();
    DirectedSubgraph graph = store.getDirectedGraph(view);
    Assert.assertTrue(graph.isSelfLoop(edge));
    Assert.assertFalse(graph.isSelfLoop(graph.getEdge("0")));
}