@Override
    public CompletableFuture<AckResult> ackMessage(ProxyContext ctx, ReceiptHandle handle, String messageId,
        AckMessageRequestHeader requestHeader, long timeoutMillis) {
        return this.mqClientAPIFactory.getClient().ackMessageAsync(
            this.resolveBrokerAddrInReceiptHandle(ctx, handle),
            requestHeader,
            timeoutMillis
        );
    }
@Test
    public void testAckMessageByInvalidBrokerNameHandle() throws Exception {
        when(topicRouteService.getBrokerAddr(any(), anyString())).thenThrow(new MQClientException(ResponseCode.TOPIC_NOT_EXIST, ""));
        try {
            this.clusterMessageService.ackMessage(
                ProxyContext.create(),
                ReceiptHandle.builder()
                    .startOffset(0L)
                    .retrieveTime(System.currentTimeMillis())
                    .invisibleTime(3000)
                    .reviveQueueId(1)
                    .topicType(ReceiptHandle.NORMAL_TOPIC)
                    .brokerName("notExistBroker")
                    .queueId(0)
                    .offset(123)
                    .commitLogOffset(0L)
                    .build(),
                MessageClientIDSetter.createUniqID(),
                new AckMessageRequestHeader(),
                3000);
            fail();
        } catch (Exception e) {
            assertTrue(e instanceof ProxyException);
            ProxyException proxyException = (ProxyException) e;
            assertEquals(ProxyExceptionCode.INVALID_RECEIPT_HANDLE, proxyException.getCode());
        }
    }