public void TestFromPosixFilePermissions()
 {
     Assert.AreEqual(
         new FilePermissions(PosixFilePermissions.None), FilePermissions.FromPosixFilePermissions(ImmutableHashSet.Create <PosixFilePermissions>()));
     Assert.AreEqual(
         new FilePermissions(PosixFilePermissions.OwnerExecute | PosixFilePermissions.GroupExecute),
         FilePermissions.FromPosixFilePermissions(
             ImmutableHashSet.Create(PosixFilePermissions.OwnerExecute, PosixFilePermissions.GroupExecute)));
     Assert.AreEqual(
         new FilePermissions(PosixFilePermissions.OwnerWrite | PosixFilePermissions.OthersWrite),
         FilePermissions.FromPosixFilePermissions(
             ImmutableHashSet.Create(PosixFilePermissions.OwnerWrite, PosixFilePermissions.OthersWrite)));
     Assert.AreEqual(
         new FilePermissions(PosixFilePermissions.GroupRead | PosixFilePermissions.OthersRead),
         FilePermissions.FromPosixFilePermissions(
             ImmutableHashSet.Create(PosixFilePermissions.GroupRead, PosixFilePermissions.OthersRead)));
     Assert.AreEqual(
         new FilePermissions(PosixFilePermissions.OwnerAll | PosixFilePermissions.GroupAll | PosixFilePermissions.OthersAll),
         FilePermissions.FromPosixFilePermissions(
             ImmutableHashSet.CreateRange(Enum.GetValues(typeof(PosixFilePermissions)).Cast <PosixFilePermissions>())));
 }