@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 shouldIgnoreEmptyAttributeNames() throws Exception {
        // given
        configuration.setAttributeNames("");
        configuration.setMessageAttributeNames("");
        configuration.setSortAttributeName("");
        try (var tested = createConsumer(9)) {

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

            // then
            var expectedRequest = expectedReceiveRequestBuilder()
                    .messageSystemAttributeNames((List<MessageSystemAttributeName>) null)
                    .messageAttributeNames((List<String>) null)
                    .maxNumberOfMessages(9)
                    .build();
            assertThat(polledMessagesCount).isZero();
            assertThat(receivedExchanges).isEmpty();
            assertThat(sqsClientMock.getReceiveRequests()).containsExactlyInAnyOrder(expectedRequest);
            assertThat(sqsClientMock.getQueues()).isEmpty();
        }
    }