public async Task GetFileAsyncPreconditions()
        {
            var handler = new MockHandler("Hello");
            HttpClient client = null;
            string requestUri = "http://dot.net";
            string tempFileName = Path.GetTempFileName();

            await AsyncAssert.ThrowsException<ArgumentNullException>(async () =>
            {
                await client.GetFileAsync(requestUri, tempFileName);
            });
            await AsyncAssert.ThrowsException<ArgumentNullException>(async () =>
            {
                await client.GetFileAsync(new Uri(requestUri), tempFileName);
            });

            client = new HttpClient(handler);
            await AsyncAssert.ThrowsException<ArgumentNullException>(async () =>
            {
                await client.GetFileAsync((string)null, tempFileName);
            });
            await AsyncAssert.ThrowsException<ArgumentNullException>(async () =>
            {
                await client.GetFileAsync((Uri)null, tempFileName);
            });

            await AsyncAssert.ThrowsException<ArgumentException>(async () =>
            {
                await client.GetFileAsync(string.Empty, tempFileName);
            });

            await AsyncAssert.ThrowsException<ArgumentNullException>(async () =>
            {
                await client.GetFileAsync(requestUri, null);
            });
            await AsyncAssert.ThrowsException<ArgumentNullException>(async () =>
            {
                await client.GetFileAsync(new Uri(requestUri), null);
            });
            await AsyncAssert.ThrowsException<ArgumentException>(async () =>
            {
                await client.GetFileAsync(requestUri, string.Empty);
            });
            await AsyncAssert.ThrowsException<ArgumentException>(async () =>
            {
                await client.GetFileAsync(new Uri(requestUri), string.Empty);
            });
        }
        public async Task GetFileAsync()
        {
            var handler = new MockHandler("Hello");
            var client = new HttpClient(handler);

            string tempFileName = Path.GetTempFileName();
            await client.GetFileAsync("http://dot.net", tempFileName);
            Assert.AreEqual(handler.Response, File.ReadAllText(tempFileName));

            tempFileName = Path.GetTempFileName();
            await client.GetFileAsync(new Uri("http://dot.net"), tempFileName);
            Assert.AreEqual(handler.Response, File.ReadAllText(tempFileName));
        }