@Override
    public boolean tryTransfer(V v) {
        RemotePromise<Void> future = (RemotePromise<Void>) service.invoke(v).toCompletableFuture();
        boolean added = commandExecutor.get(future.getAddFuture());
        if (added && !future.cancel(false)) {
            commandExecutor.get(future);
            return true;
        }
        return false;
    }
@Test
    public void testTryTransfer() throws InterruptedException, ExecutionException {
        RTransferQueue<Integer> queue1 = redisson.getTransferQueue("queue");
        AtomicBoolean takeExecuted = new AtomicBoolean();
        ScheduledFuture<?> f = Executors.newSingleThreadScheduledExecutor().schedule(() -> {
            RTransferQueue<Integer> queue = redisson.getTransferQueue("queue");
            boolean res = queue.tryTransfer(3);
            assertThat(takeExecuted.get()).isTrue();
            assertThat(res).isTrue();
            boolean res2 = queue.tryTransfer(4);
            assertThat(res2).isFalse();
        }, 4, TimeUnit.SECONDS);

        Awaitility.await().atLeast(Duration.ofMillis(3900)).untilAsserted(() -> {
            int l = queue1.take();
            takeExecuted.set(true);
            assertThat(l).isEqualTo(3);
        });
        f.get();
        assertThat(queue1.size()).isZero();
        assertThat(queue1.peek()).isNull();
    }