@@ -0,0 +1,1505 @@
+package com.test.graphs;%0A%0Aimport java.util.LinkedList;%0A%0Aimport com.graphs.GraphAdjacencyListRepresentation;%0Aimport com.graphs.MostDirectPath;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class TestMostDirectPath extends TestCase %7B%0A%0A    public void testMostDirectPath() %7B%0A%0A        GraphAdjacencyListRepresentation graph = new GraphAdjacencyListRepresentation(13, true);%0A        graph.addEdge(0, 5);%0A        graph.addEdge(0, 1);%0A%0A        graph.addEdge(2, 0);%0A        graph.addEdge(2, 3);%0A%0A        graph.addEdge(3, 5);%0A        graph.addEdge(3, 2);%0A%0A        graph.addEdge(4, 3);%0A        graph.addEdge(4, 2);%0A%0A        graph.addEdge(5, 4);%0A%0A        graph.addEdge(6, 4);%0A        graph.addEdge(6, 8);%0A        graph.addEdge(6, 0);%0A        graph.addEdge(6, 9);%0A%0A        graph.addEdge(7, 6);%0A%0A        graph.addEdge(8, 6);%0A%0A        graph.addEdge(9, 11);%0A        graph.addEdge(9, 10);%0A%0A        graph.addEdge(10, 12);%0A%0A        graph.addEdge(11, 12);%0A%0A        graph.addEdge(12, 9);%0A        %0A        MostDirectPath dp = new MostDirectPath(graph, 6);%0A        assertEquals(0, dp.getDistance(6));%0A        assertEquals(-1, dp.getDistance(7));%0A        assertEquals(2, dp.getDistance(2));%0A        assertEquals(2, dp.getDistance(5));%0A        %0A        LinkedList%3CInteger%3E pathTo3 = new LinkedList%3C%3E();%0A        pathTo3.add(6);%0A        pathTo3.add(4);%0A        pathTo3.add(3);%0A        %0A        System.out.println(dp.getMostDirectPath(3));%0A        %0A        assertEquals(true, pathTo3.equals(dp.getMostDirectPath(3)));%0A        %0A    %7D%0A%0A%7D%0A

Add JUnit test for MostDirectPath