Add tests for traverse