Added tests for the graph implementation. Time test and check test.