add testcase for query