public void CreatePackageManagerUsesProvidedOverrides()
        {
            // Arrange
            Mock<IPackageRepositoryFactory> mockFactory = new Mock<IPackageRepositoryFactory>();
            PackageManagementCommand cmd = new Mock<PackageManagementCommand>() { CallBase = true }.Object;
            cmd.Source = "foo";
            cmd.Destination = @"D:\";
            cmd.RepositoryFactory = mockFactory.Object;
            IPackageRepository expected = new Mock<IPackageRepository>().Object;
            mockFactory.Setup(f => f.CreateRepository("foo")).Returns(expected);

            // Act
            IPackageManager manager = cmd.CreatePackageManager();

            // Assert
            PhysicalFileSystem fs = Assert.IsType<PhysicalFileSystem>(manager.FileSystem);
            DefaultPackagePathResolver resolver = Assert.IsType<DefaultPackagePathResolver>(manager.PathResolver);
            Assert.Same(expected, manager.SourceRepository);
            Assert.Equal(@"D:\", fs.Root);
            Assert.Equal(@"foo", resolver.GetPackageDirectory("foo", new SemanticVersion(1, 0, 0, 0)));
        }