a test for breadthFirstSearch