Add test for search migration logic