Query handler tests.