ISPN-3015 Add tests to cover more types of queries