Add more tests for query componentization