@Override
    public RateLimiter rateLimiter(final String name) {
        return rateLimiter(name, getDefaultConfig());
    }
@Test
    @SuppressWarnings("unchecked")
    public void rateLimiterPositiveWithSupplier() throws Exception {
        RateLimiterRegistry registry = new InMemoryRateLimiterRegistry(config);
        Supplier<RateLimiterConfig> rateLimiterConfigSupplier = mock(Supplier.class);
        when(rateLimiterConfigSupplier.get())
            .thenReturn(config);

        RateLimiter firstRateLimiter = registry.rateLimiter("test", rateLimiterConfigSupplier);
        verify(rateLimiterConfigSupplier, times(1)).get();
        RateLimiter sameAsFirst = registry.rateLimiter("test", rateLimiterConfigSupplier);
        verify(rateLimiterConfigSupplier, times(1)).get();
        RateLimiter anotherLimit = registry.rateLimiter("test1", rateLimiterConfigSupplier);
        verify(rateLimiterConfigSupplier, times(2)).get();

        then(firstRateLimiter).isEqualTo(sameAsFirst);
        then(firstRateLimiter).isNotEqualTo(anotherLimit);
    }