public void TestZeroRetries()
        {
            var client = new Mock<IDs3Client>(MockBehavior.Strict);
            MockHelpers.SetupGetObjectWithContentLengthMismatchException(client, "bar", 0L, "ABCDEFGHIJ", 20L, 10L);
                // The initial request is for all 20 bytes, but only the first 10 will be sent

            try
            {
                var stream = new MemoryStream(200);
                var exceptionTransferStrategy = new ReadTransferStrategy();
                var decorator = new PartialDataTransferStrategyDecorator(exceptionTransferStrategy, 0);
                decorator.Transfer(new TransferStrategyOptions
                {
                    Client = client.Object,
                    BucketName = JobResponseStubs.BucketName,
                    ObjectName = "bar",
                    BlobOffset = 0,
                    JobId = JobResponseStubs.JobId,
                    Ranges = new List<Range>(),
                    Stream = stream,
                    ObjectTransferAttempts = 0
                });
                Assert.Fail();
            }
            catch (Ds3NoMoreRetransmitException ex)
            {
                var expectedMessage = string.Format(Resources.NoMoreRetransmitException, "0", "bar", "0");
                Assert.AreEqual(expectedMessage, ex.Message);

                Assert.AreEqual(0, ex.Retries);
            }
        }
        public void TestModifyForRetry2()
        {
            Stream stream = new MemoryStream();
            stream.Position = 10;
            var currentTryBefore = 0;
            IEnumerable<Range> rages = new List<Range>();
            ITransferStrategy transferStrategy = new ReadTransferStrategy();
            BestEffort.ModifyForRetry(stream, 5, ref currentTryBefore, "Test", 10, ref rages, ref transferStrategy,
                new Ds3ContentLengthNotMatch("", 0, 0));

            Assert.AreEqual(1, currentTryBefore);
            Assert.AreEqual(9, stream.Position);
        }