rendered paste bodyimport java.util.*;public class Test { public static void main(String args[]) { testListGraph(); specialTest(100); } public static void testListGraph() { ListGraphTest p = new ListGraphTest(); p.setUp(); p.testAreAdjacent(); p.tearDown(); p.setUp(); p.testToString(); p.tearDown(); p.setUp(); p.testNumVertices(); p.tearDown(); p.setUp(); p.testNumEdges(); p.tearDown(); p.setUp(); p.testDegree(); p.tearDown(); p.setUp(); p.testAdjacentVertices(); p.tearDown(); p.setUp(); p.testEdges(); p.tearDown(); } public static void specialTest(int n) { if(n>0) { Random randomizer = new Random(); ListGraph test = new ListGraph(n); for(int i=0; i<n; i++) { test.addEdge(randomizer.nextInt(n), randomizer.nextInt(n)); } GraphAlgorithms b = new GraphAlgorithms(); b.printComponentsDFS(test); } }}