Adds tests for BFS