protected int calculateDegree(Graph graph, Node n) {
        return graph.getDegree(n);
    }
@Test
    public void testSelfLoopGraphDegree() {
        GraphModel graphModel = GraphGenerator.generateSelfLoopUndirectedGraph(1);
        Graph graph = graphModel.getGraph();
        Node n = graph.getNode("0");
        Degree d = new Degree();
        int degree = d.calculateDegree(graph, n);
        assertEquals(degree, 2);
    }