@Override
    public boolean trySetCapacity(int capacity) {
        return get(trySetCapacityAsync(capacity));
    }
@Test
    public void testAddRemoveFullQueueError() {
        RBoundedBlockingQueue<Integer> queue1 = redisson.getBoundedBlockingQueue("bounded-queue:testAddRemoveFullQueueError");
        assertThat(queue1.trySetCapacity(1)).isTrue();
        assertThat(queue1.add(12)).isTrue();
        assertThat(queue1.remove()).isEqualTo(12);
        assertThat(queue1.add(1)).isTrue();
        try {
            queue1.add(2);
        } catch (RedisException e) {
            assertThat(e.getCause()).isInstanceOf(IllegalStateException.class);
        }
    }