Added Query integration tests