public async Task ThenAnEmptyBucketMustCauseADelay()
        {
            var testTimeProvider = new TestTimeProvider();
            var bucket           = new TokenBucket(1000, 5, testTimeProvider);

            testTimeProvider.AddMillis(1600);

            await bucket.WaitTokenAsync();

            Assert.Null(testTimeProvider.LastDelay);

            await bucket.WaitTokenAsync();

            Assert.Equal(400, testTimeProvider.LastDelay);

            testTimeProvider.AddMillis(testTimeProvider.LastDelay.Value);

            await bucket.WaitTokenAsync();

            Assert.Null(testTimeProvider.LastDelay);
        }
        public async Task ThenTheTokensMustDeplete()
        {
            var testTimeProvider = new TestTimeProvider();
            var bucket           = new TokenBucket(1000, 5, testTimeProvider);

            testTimeProvider.AddMillis(4000);
            await bucket.WaitTokenAsync();

            Assert.Equal(3, bucket.Tokens);

            await bucket.WaitTokenAsync();

            Assert.Equal(2, bucket.Tokens);

            await bucket.WaitTokenAsync();

            Assert.Equal(1, bucket.Tokens);
        }