public void Imperson_DownloadAsBytes_Failed_Test() { using (var copy = new Impersonator()) { Assert.True(copy.Impersonate(uncDomain, uncUser, uncPassword + "s")); var bytes = copy.DownloadAsBytes(uncPath, @"test.pdf"); Assert.AreNotEqual(null, bytes); var destFileName = @"D:" + @"\" + @"test.pdf"; File.WriteAllBytes(@destFileName, bytes); } }