@Override
    protected int poll() throws Exception {
        // must reset for each poll
        shutdownRunningTask = null;
        pendingExchanges = 0;

        List<software.amazon.awssdk.services.sqs.model.Message> messages = pollingTask.call();
        // okay we have some response from aws so lets mark the consumer as ready
        forceConsumerAsReady();

        Queue<Exchange> exchanges = createExchanges(messages);
        return processBatch(CastUtils.cast(exchanges));
    }
@Test
    void shouldRequest10MessagesWithSingleReceiveRequestAndIgnoredSequenceNumberSorting() throws Exception {
        // given
        generateSequenceNumber = false;
        var expectedMessages = IntStream.range(0, 10).mapToObj(Integer::toString).toList();
        expectedMessages.stream().map(this::message).forEach(sqsClientMock::addMessage);

        try (var tested = createConsumer(10)) {

            // when
            var polledMessagesCount = tested.poll();

            // then
            assertThat(polledMessagesCount).isEqualTo(10);
            assertThat(receiveMessageBodies()).isEqualTo(expectedMessages);
            assertThat(sqsClientMock.getReceiveRequests()).containsExactlyInAnyOrder(expectedReceiveRequest(10));
            assertThat(sqsClientMock.getQueues()).isEmpty();
        }
    }