Add test for no query case