@Test
    public void testExecute() throws Exception {
        Extent extent = new Extent(0d, 0d, 201d, 201d);

        GraphBuilder<MyLocatableNode, Object> builder = Graphs.createGridIndexedGraphBuilder(extent, 10);
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5; j++) {
                if (weights[i][j] > 0f) {
                    final int finalI = i;
                    final int finalJ = j;
                    builder.addEdge(copy(myNodes[i]), copy(myNodes[j]), new EdgeWeight() {
                        public float getValue(int weightKind) {
                            return weights[finalI][finalJ];
                        }
                    });
                }
            }
        }


        LocateableGraph<MyLocatableNode, Object> graph = builder.build();
        for (InternalNode<MyLocatableNode, Object> nd : graph) {
            System.out.println(nd);
        }

        GraphAlgorithm<Path<MyLocatableNode>> algorithm = GraphAlgorithms.createDijkstra(graph, myNodes[0], myNodes[3], 0);

        algorithm.execute();

        Path<MyLocatableNode> p = algorithm.getResult();
        System.out.println("Calculated path = " + p);

        assertTrue(p.isValid());
        assertTrue(p.getSource().equals(myNodes[0]));
        assertTrue(p.getDestination().equals(myNodes[3]));
        assertEquals(9f, p.totalWeight(), 0.01f);

    }