public void RetryWithInvokeDirectly()
        {
            // Arrange
            var config = new RetryConfig
            {
                MaxRetries         = 10,
                WaitBetweenRetries = TimeSpan.FromSeconds(1),
                RetryForever       = false
            };

            Func <int> fun = () => 2 + 2;

            // Act.
            var res = config.Invoke(fun);

            // Assert.
            Assert.Equal(4, res.Result);
            Assert.Equal(1, res.RetryInfo.Executions);
            Assert.True(res.Successful);
        }