Add integration spec for query and match