*/
public void testCycleDetection() {
SimpleGraph simpleGraph = new SimpleGraph(5);
simpleGraph.addEdge(new AnnotatedEdge<Integer, Double, Object>(0, 1));
simpleGraph.addEdge(new AnnotatedEdge<Integer, Double, Object>(1, 2));
simpleGraph.addEdge(new AnnotatedEdge<Integer, Double, Object>(2, 3));
simpleGraph.addEdge(new AnnotatedEdge<Integer, Double, Object>(3, 4));
List<Integer> cycle = CycleDetection.detectCycle(simpleGraph);
assertTrue("There is no cycle in the given graph.", cycle.isEmpty());
simpleGraph.addEdge(new AnnotatedEdge<Integer, Double, Object>(4, 2));
cycle = CycleDetection.detectCycle(simpleGraph);