public void ExecuteAsyncTest()
        {
            IRetryPolicy retryPolicy = new LinearRetryPolicyFactory(
                TraceType,
                500,
                3,
                IsRetriableException).Create();

            int retryCount = 0;

            try
            {
                retryPolicy
                .ExecuteAsync(async(token) =>
                {
                    retryCount++;

                    if (retryCount < 10)
                    {
                        throw new TimeoutException("timeout");
                    }

                    return(await Task.FromResult(true));
                },
                              "func1",
                              CancellationToken.None)
                .GetAwaiter()
                .GetResult();
            }
            catch (AggregateException ae)
            {
                AggregateException flatEx = ae.Flatten();

                flatEx.Handle(e => e is TimeoutException);

                Assert.AreEqual(retryCount, 3, "retry policy allowed retry 3 times as expected");
            }
        }