private async Task <Package> SaveTestPackageFile()
        {
            using (var stream = new MemoryStream(File.ReadAllBytes(TestPackageHelper.GetOSVersionPackageFilePath())))
            {
                using (var reader = new PackageArchiveReader(stream))
                {
                    var saveResult = await _packageFileStorageService.Save(reader.NuspecReader, stream);

                    return(saveResult);
                }
            }
        }
        public async Task Save_ThrowsException_WhenStreamWasDisposedBefore()
        {
            //setup
            TestPackageHelper.CleanPackagesDefaultDirectory(PackagesFileHelper.GetDefaultPackagesFolderFullPath());

            // Act + assert
            using (var stream = new MemoryStream(File.ReadAllBytes(TestPackageHelper.GetOSVersionPackageFilePath())))
            {
                using (var reader = new PackageArchiveReader(stream))
                {
                    stream.Dispose();
                    await Assert.ThrowsAsync <ObjectDisposedException>(() => _packageFileStorageService.Save(reader.NuspecReader, stream));
                }
            }
        }