@Override
    public boolean trySetCapacity(int capacity) {
        return get(trySetCapacityAsync(capacity));
    }
@Test
    public void testConcurrentPut() throws InterruptedException {
        final RBoundedBlockingQueue<Integer> queue1 = redisson.getBoundedBlockingQueue("bounded-queue:testConcurrentPut");
        assertThat(queue1.trySetCapacity(10000)).isTrue();
        ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
        for (int i = 0; i < 10000; i++) {
            final int k = i;
            executor.execute(new Runnable() {
                @Override
                public void run() {
                    queue1.add(k);
                }
            });
        }
        
        executor.shutdown();
        assertThat(executor.awaitTermination(1, TimeUnit.MINUTES)).isTrue();
        
        assertThat(queue1.size()).isEqualTo(10000);
    }