@SuppressWarnings("unchecked")
    @Override
    public void execute(String mapName, Predicate predicate, Collection<Integer> partitions, Result result) {
        runUsingPartitionScanWithoutPaging(mapName, predicate, partitions, result);
        if (predicate instanceof PagingPredicateImpl pagingPredicate) {
            Map.Entry<Integer, Map.Entry> nearestAnchorEntry = pagingPredicate.getNearestAnchorEntry();
            result.orderAndLimit(pagingPredicate, nearestAnchorEntry);
        }
    }
@Test
    public void execute_fail_retryable() {
        PartitionScanRunner runner = mock(PartitionScanRunner.class);
        ParallelPartitionScanExecutor executor = executor(runner);
        Predicate<Object, Object> predicate = Predicates.equal("attribute", 1);
        QueryResult queryResult = new QueryResult(IterationType.ENTRY, null, null, Long.MAX_VALUE, false);

        doThrow(new RetryableHazelcastException()).when(runner).run(anyString(), eq(predicate), anyInt(), isA(QueryResult.class));

        List<Integer> list = asList(1, 2, 3);
        assertThatThrownBy(() -> executor.execute("Map", predicate, list, queryResult))
                .isInstanceOf(RetryableHazelcastException.class);
    }