public Result runIndexOrPartitionScanQueryOnOwnedPartitions(Query query) {
        Result result = runIndexOrPartitionScanQueryOnOwnedPartitions(query, true);
        assert result != null;
        return result;
    }
@Test
    public void verifyIndexedQueryFailureWhileMigrating() {
        map.addIndex(IndexType.HASH, "this");
        EqualPredicate predicate = new EqualPredicate("this", value);

        mapService.beforeMigration(new PartitionMigrationEvent(MigrationEndpoint.SOURCE, partitionId, 0, 1, UUID.randomUUID()));

        Query query = Query.of()
                .mapName(map.getName())
                .predicate(predicate)
                .iterationType(IterationType.ENTRY)
                .partitionIdSet(SetUtil.allPartitionIds(instance.getPartitionService().getPartitions().size()))
                .build();
        QueryResult result = (QueryResult) queryRunner.runIndexOrPartitionScanQueryOnOwnedPartitions(query);
        assertNull(result.getPartitionIds());
    }