@Override
    public boolean trySetCapacity(int capacity) {
        return get(trySetCapacityAsync(capacity));
    }
@Test
    public void testExpire() throws InterruptedException {
        RBoundedBlockingQueue<Integer> queue = redisson.getBoundedBlockingQueue("queue1");
        queue.trySetCapacity(10);
        queue.add(1);
        queue.add(2);

        queue.expire(Duration.ofMillis(100));

        Thread.sleep(500);

        assertThat(queue).isEmpty();
        assertThat(queue.size()).isZero();
    }