public void TimeoutIfCannotRetry()
            {
                var backoff = new ExponentialBackoff(TimeSpan.FromMilliseconds(1));

                Thread.Sleep(20);

                Assert.Throws <TimeoutException>(() => backoff.WaitOrTimeout(new Exception()));
            }
            public void WaitIfCanRetry()
            {
                var backoff = new ExponentialBackoff(TimeSpan.FromMilliseconds(100));

                backoff.WaitOrTimeout(new Exception());
            }
            public void WaitIfCanRetry()
            {
                var backoff = new ExponentialBackoff(TimeSpan.FromMilliseconds(100));

                backoff.WaitOrTimeout(new Exception());
            }
            public void TimeoutIfCannotRetry()
            {
                var backoff = new ExponentialBackoff(TimeSpan.FromMilliseconds(1));

                Thread.Sleep(20);

                Assert.Throws<TimeoutException>(() => backoff.WaitOrTimeout(new Exception()));
            }