@Override
    public void writeAndFlush(final Object obj) {
        Future future = writeQueue.enqueue(obj);
        future.addListener((FutureListener) future1 -> {
            if (!future1.isSuccess()) {
                Throwable throwable = future1.cause();
                LOGGER.error("Failed to send to "
                    + NetUtils.channelToString(localAddress(), remoteAddress())
                    + " for msg : " + obj
                    + ", Cause by:", throwable);
            }
        });
    }
@Test
    public void testRunSuccess() throws Exception {
        nettyChannel.writeAndFlush("111");

        Mockito.verify(mockWriteQueue).enqueue("111");

        ArgumentCaptor<GenericFutureListener> captor = ArgumentCaptor.forClass(GenericFutureListener.class);
        Mockito.verify(mockFuture).addListener(captor.capture());

        // 模拟 FutureListener 的回调
        GenericFutureListener<Future<Object>> listener = captor.getValue();
        listener.operationComplete((Future) mockFuture);

        // 验证没有错误日志被记录（因为操作是成功的）
        //        Mockito.verify(Mockito.mock(NetUtils.class), times(10));
        //        NetUtils.channelToString(any(InetSocketAddress.class), any(InetSocketAddress.class));
    }