@Test
    void verifyFailureAsync() {
        val props = new Bucket4jThrottleProperties();
        props.setBlocking(false);
        props.getBandwidth().add(new Bucket4jBandwidthLimitProperties().setCapacity(1).setRefillDuration("PT1S"));
        val producer = new DefaultBucketConsumer(new InMemoryBucketStore(props), props);
        val key = UUID.randomUUID().toString();
        var result = producer.consume(key);
        assertTrue(result.isConsumed());
        result = producer.consume(key);
        assertFalse(result.isConsumed());
    }
This is {@link DefaultBucketConsumerTests}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-bucket4j-core/src/test/java/org/apereo/cas/bucket4j/consumer/DefaultBucketConsumerTests.java