test: add `queryState()` tests