add test case to query