Test breadth-first search traversal