@Override
    public void execute(GraphModel graphModel) {
        Graph graph = graphModel.getGraphVisible();
        execute(graph);
    }
@Test
    public void testDirectedStarOutGraphDegree() {
        GraphModel graphModel = GraphModel.Factory.newInstance();

        DirectedGraph directedGraph = graphModel.getDirectedGraph();
        Node firstNode = graphModel.factory().newNode("0");
        directedGraph.addNode(firstNode);
        for (int i = 1; i <= 5; i++) {
            Node currentNode = graphModel.factory().newNode(((Integer) i).toString());
            directedGraph.addNode(currentNode);
            Edge currentEdge = graphModel.factory().newEdge(firstNode, currentNode);
            directedGraph.addEdge(currentEdge);
        }

        DirectedGraph graph = graphModel.getDirectedGraph();
        Node n1 = graph.getNode("0");
        Node n3 = graph.getNode("2");
        WeightedDegree d = new WeightedDegree();
        d.execute(graph);
        double inDegree1 = (Double) n1.getAttribute(WeightedDegree.WINDEGREE);
        double outDegree1 = (Double) n1.getAttribute(WeightedDegree.WOUTDEGREE);
        double degree3 = (Double) n3.getAttribute(WeightedDegree.WDEGREE);

        assertEquals(inDegree1, 0.0);
        assertEquals(outDegree1, 5.0);
        assertEquals(degree3, 1.0);
    }