@Test
public void testTokenBucketPersistsIfNotReconfigured() {

    settableConfig.setProperty("junit.initialNumberOfTokens", "1");
    settableConfig.setProperty("junit.capacity", "1");
    settableConfig.setProperty("junit.numberOfTokensPerInterval", "0");
    TokenBucket tokenBucket = supplier.get();
    assertThat(tokenBucket.tryTake()).isTrue();
    assertThat(tokenBucket.tryTake()).isFalse();
    tokenBucket.refill(1);
    assertThat(tokenBucket.tryTake()).isTrue();
    assertThat(supplier.get() == tokenBucket).isTrue();
    assertThat(buckets).hasSize(2);
    assertThat(buckets.get(1)).isEqualTo(tokenBucket);
}