@Test
    void verifyNoBucket() {
        val limit1 = new Bucket4jBandwidthLimitProperties()
            .setDuration("PT15S")
            .setInitialTokens(100)
            .setRefillStrategy(Bucket4jBandwidthLimitProperties.BandwidthRefillStrategies.GREEDY);
        val props = new Bucket4jThrottleProperties().setBandwidth(List.of(limit1));
        val store = mock(BucketStore.class);
        when(store.obtainBucket(anyString())).thenReturn(null);
        val producer = new DefaultBucketConsumer(store, props);
        assertFalse(producer.consume(UUID.randomUUID().toString()).isConsumed());
    }
This is {@link BucketProducerTests}.

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