public QueueOperationResponse updateMessage(final Exchange exchange) {
        ObjectHelper.notNull(exchange, MISSING_EXCHANGE);

        final String updatedText = exchange.getIn().getBody(String.class);
        final String messageId = configurationOptionsProxy.getMessageId(exchange);
        final String popReceipt = configurationOptionsProxy.getPopReceipt(exchange);
        final Duration visibilityTimeout = configurationOptionsProxy.getVisibilityTimeout(exchange);
        final Duration timeout = configurationOptionsProxy.getTimeout(exchange);

        if (ObjectHelper.isEmpty(messageId)) {
            throw new IllegalArgumentException(
                    String.format("Message ID must be specified in camel headers '%s' for updateMessage "
                                  + "operation.",
                            QueueConstants.MESSAGE_ID));
        }

        if (ObjectHelper.isEmpty(popReceipt)) {
            throw new IllegalArgumentException(
                    String.format("Message Pop Receipt must be specified in camel headers '%s' for updateMessage "
                                  + "operation.",
                            QueueConstants.POP_RECEIPT));
        }

        if (ObjectHelper.isEmpty(visibilityTimeout)) {
            throw new IllegalArgumentException(
                    String.format("Visibility Timeout must be specified in camel headers '%s' for updateMessage "
                                  + "operation.",
                            QueueConstants.VISIBILITY_TIMEOUT));
        }

        final Response<UpdateMessageResult> response
                = client.updateMessage(messageId, popReceipt, updatedText, visibilityTimeout, timeout);
        final QueueExchangeHeaders headers = new QueueExchangeHeaders()
                .timeNextVisible(response.getValue().getTimeNextVisible())
                .popReceipt(response.getValue().getPopReceipt())
                .httpHeaders(response.getHeaders());

        return QueueOperationResponse.createWithEmptyBody(headers.toMap());
    }
@Test
    public void testUpdateMessage() {
        //mocking
        final HttpHeaders httpHeaders = new HttpHeaders().set("x-test-header", "123");
        final UpdateMessageResult result = new UpdateMessageResult("12", OffsetDateTime.now());
        when(client.updateMessage(any(), any(), any(), any(), any()))
                .thenReturn(new ResponseBase<>(null, 200, httpHeaders, result, null));

        final QueueOperations operations = new QueueOperations(configuration, client);
        final Exchange exchange = new DefaultExchange(context);

        // test if we have nothing set on exchange
        assertThrows(IllegalArgumentException.class, () -> operations.updateMessage(exchange));

        exchange.getIn().setHeader(QueueConstants.MESSAGE_ID, "1");
        assertThrows(IllegalArgumentException.class, () -> operations.updateMessage(exchange));

        exchange.getIn().removeHeader(QueueConstants.MESSAGE_ID);
        exchange.getIn().setHeader(QueueConstants.POP_RECEIPT, "12");
        assertThrows(IllegalArgumentException.class, () -> operations.updateMessage(exchange));

        exchange.getIn().setHeader(QueueConstants.MESSAGE_ID, "1");
        assertThrows(IllegalArgumentException.class, () -> operations.updateMessage(exchange));

        exchange.getIn().setHeader(QueueConstants.VISIBILITY_TIMEOUT, Duration.ofMillis(10));

        final QueueOperationResponse response = operations.updateMessage(exchange);

        assertNotNull(response);
        assertTrue((boolean) response.getBody());
        assertNotNull(response.getHeaders());
    }