Query tests.