#[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert!(target.join("file2").exists() && target.join("file2").is_symlink()); },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } });
    "new symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        symlink(source.join("file1"), target.join("file2")).unwrap();
        assert_eq!(DO_NOTHING.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(DO_NOTHING.get(), true); },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } });
    "identical symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(source.join("file2")).unwrap();
        symlink(source.join("file2"), target.join("file3")).unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(PROMPT.get(), true); },
    |_, _| expected_manifest!(),
    |_, _| expected_manifest!();
    "unmanaged symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(source.join("file2")).unwrap();
        symlink(source.join("file2"), target.join("file3")).unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(PROMPT.get(), true); },
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file4") } }),
    |_, _| expected_manifest!();
    "modified symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(source.join("file2")).unwrap();
        symlink(source.join("file2"), target.join("file3")).unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |source, target| { assert_eq!(read_link(target.join("file3")).unwrap(), source.join("file1")); },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file1") }});
    "overwrite unmanaged symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(source.join("file2")).unwrap();
        symlink(source.join("file2"), target.join("file3")).unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |source, target| { assert_eq!(read_link(target.join("file3")).unwrap(), source.join("file1")); },
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file4") } }),
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file1") }});
    "overwrite modified symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(source.join("file2")).unwrap();
        symlink(source.join("file2"), target.join("file3")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |source, target| { assert_eq!(read_link(target.join("file3")).unwrap(), source.join("file1")); },
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file2") } }),
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file1") } });
    "managed symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap().write_all(b"test").unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert_eq!(read_to_string(target.join("file2")).unwrap(), "test");
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "new file")]
    #[test_case(|source, target| {
        let bytes = b"test";
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(bytes).unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(bytes).unwrap();
        assert_eq!(DO_NOTHING.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(DO_NOTHING.get(), true); },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() }});
    "identical file")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"test1").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test2").unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(PROMPT.get(), true); },
    |_, _| expected_manifest!(),
    |_, _| expected_manifest!();
    "unmanaged file")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"test1").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test2").unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(PROMPT.get(), true); },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: String::new() } }),
    |_, _| expected_manifest!();
    "modified file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        let mut file = File::create(target.join("file2")).unwrap();
        file.write_all(b"test").unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert_eq!(read_to_string(target.join("file2")).unwrap(), "") },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() }});
    "overwrite unmanaged file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        let mut file = File::create(target.join("file2")).unwrap();
        file.write_all(b"test").unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert_eq!(read_to_string(target.join("file2")).unwrap(), "") },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: String::new() }}),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() }});
    "overwrite modified file")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"test1").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test2").unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert_eq!(read_to_string(target.join("file2")).unwrap(), "test1");
    },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&target.join("file2")).unwrap() } }),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "managed file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap().write_all(b"{{\"test\"}}").unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Tmpl, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert_eq!(read_to_string(target.join("file2")).unwrap(), "test");
    },
    |_, _| expected_manifest!(),
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: format!("{:x}", Sha256::digest("test")) } });
    "new template")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"{{\"test\"}}").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test").unwrap();
        assert_eq!(DO_NOTHING.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Tmpl, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(DO_NOTHING.get(), true); },
    |_, _| expected_manifest!(),
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: format!("{:x}", Sha256::digest("test")) }});
    "identical template")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"test1").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test2").unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Tmpl, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(PROMPT.get(), true); },
    |_, _| expected_manifest!(),
    |_, _| expected_manifest!();
    "unmanaged template")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"test1").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test2").unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Tmpl, permission: Permissions::from(Octal::default()) } ]
    },
    |_, _| { assert_eq!(PROMPT.get(), true); },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: String::new() } }),
    |_, _| expected_manifest!();
    "modified template")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        origin.write_all(b"test1").unwrap();
        let mut copy = File::create(target.join("file2")).unwrap();
        copy.write_all(b"test2").unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Tmpl, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert_eq!(read_to_string(target.join("file2")).unwrap(), "test1");
    },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&target.join("file2")).unwrap() } }),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "managed template")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(target.join("file2")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |source, target| {
        assert!(target.join("file2").is_symlink());
        assert_eq!(read_link(target.join("file2")).unwrap(), source.join("file1"));
    },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&target.join("file2")).unwrap() } }),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } });
    "replace managed file with symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        symlink(source.join("file1"), target.join("file2")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert!(!target.join("file2").is_symlink()) },
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } }),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "replace managed symlink with file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("output/dir1/file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert!(target.join("output/dir1/file2").exists()) },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("output/dir1/file2") => ManifestType::Link { source: source.join("file1") } });
    "create nested symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("output/dir1/file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert!(target.join("output/dir1/file2").exists()) },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("output/dir1/file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "create nested file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        create_dir(target.join("file2")).unwrap();
        File::create(target.join("file2/file3")).unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert!(target.join("file2").exists() && target.join("file2").is_file());
        assert!(!target.join("file2/file3").exists());
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } });
    "overwrite directory with symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        create_dir(target.join("file2")).unwrap();
        File::create(target.join("file2/file3")).unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert!(target.join("file2").exists() && target.join("file2").is_file());
        assert!(!target.join("file2/file3").exists());
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "overwrite directory with file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(target.join("dir1")).unwrap();
        assert_eq!(PROMPT.get(), false);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("dir1/file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert!(target.join("dir1").is_file());
        assert_eq!(PROMPT.get(), true);
    },
    |_, _| expected_manifest!(),
    |_, _| expected_manifest!();
    "parent directory collided")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        File::create(target.join("dir1")).unwrap();
        OVERWRITE.set(true);
        vec![ PortalMapping { source: source.join("file1"), target: target.join("dir1/file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert!(target.join("dir1/file2").is_file());
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("dir1/file2") => ManifestType::Link { source: source.join("file1") } });
    "overwrite parent directory collision")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        symlink(source.join("file1"), source.join("file2")).unwrap();
        vec![ PortalMapping { source: source.join("file2"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |source, target| {
        assert!(target.join("file3").is_symlink());
        assert_eq!(read_link(target.join("file3")).unwrap(), source.join("file2"));
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file2") } });
    "link symlink")]
    #[test_case(|source, target| {
        let mut origin = File::create(source.join("file1")).unwrap();
        symlink(source.join("file1"), source.join("file2")).unwrap();
        origin.write_all(b"test").unwrap();
        vec![ PortalMapping { source: source.join("file2"), target: target.join("file3"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert!(!target.join("file3").is_symlink());
        assert_eq!(read_to_string(target.join("file3")).unwrap(), "test");
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::File { hash: calculate_file_hash(&source.join("file1")).unwrap() } });
    "copy symlink")]
    #[test_case(|source, target| {
        symlink(source.join("file1"), source.join("file2")).unwrap();
        vec![ PortalMapping { source: source.join("file2"), target: target.join("file3"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |source, target| {
        assert!(target.join("file3").is_symlink());
        assert_eq!(read_link(target.join("file3")).unwrap(), source.join("file2"));
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file3") => ManifestType::Link { source: source.join("file2") } });
    "link broken symlink")]
    #[test_case(|source, target| {
        symlink(source.join("file1"), source.join("file2")).unwrap();
        vec![ PortalMapping { source: source.join("file2"), target: target.join("file3"), file_type: FileType::Copy, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| {
        assert!(!target.join("file3").exists());
    },
    |_, _| expected_manifest!(),
    |_, _| expected_manifest!();
    "copy broken symlink")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        create_dir(source.join("dir1")).unwrap();
        File::create(source.join("dir1/file2")).unwrap();
        vec![
            PortalMapping {
                source: source.join("file1"),
                target: target.join("file1"),
                file_type: FileType::Link,
                permission: Permissions::from(Octal::default()),
            },
            PortalMapping {
                source: source.join("dir1/file2"),
                target: target.join("file2"),
                file_type: FileType::Copy,
                permission: Permissions::from(Octal::default()),
            },
        ]
    },
    |_, target| {
        assert!(target.join("file1").exists());
        assert!(target.join("file2").exists());
    },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({
        target.join("file1") => ManifestType::Link { source: source.join("file1") },
        target.join("file2") => ManifestType::File { hash: calculate_file_hash(&source.join("dir1/file2")).unwrap() },
    });
    "multiple portals")]
    #[test_case(|_, _| { vec![] },
    |_, _| { },
    |_, target| expected_manifest!({ target.join("file1") => ManifestType::Link { source: PathBuf::new() } }),
    |_, _| expected_manifest!();
    "cleanup non exist managed symlink")]
    #[test_case(|_, target| {
        File::create(target.join("file1")).unwrap();
        symlink(target.join("file1"), target.join("file2")).unwrap();
        vec![]
    },
    |_, target| { assert!(target.join("file2").exists()); },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: PathBuf::new() } }),
    |_, _| expected_manifest!();
    "cleanup modified symlink")]
    #[test_case(|_, target| {
        File::create(target.join("file1")).unwrap();
        symlink(target.join("file1"), target.join("file2")).unwrap();
        vec![]
    },
    |_, target| { assert!(!target.join("file2").exists()); },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: target.join("file1") } }),
    |_, _| expected_manifest!();
    "cleanup managed symlink")]
    #[test_case(|_, _| { vec![] },
    |_, _| { },
    |_, target| expected_manifest!({ target.join("file1") => ManifestType::File { hash: String::new() } }),
    |_, _| expected_manifest!();
    "cleanup non exist managed file")]
    #[test_case(|_, target| {
        File::create(target.join("file1")).unwrap();
        vec![]
    },
    |_, target| { assert!(target.join("file1").exists()); },
    |_, target| expected_manifest!({ target.join("file1") => ManifestType::File { hash: String::new() } }),
    |_, _| expected_manifest!();
    "cleanup modified file")]
    #[test_case(|_, target| {
        File::create(target.join("file1")).unwrap();
        vec![]
    },
    |_, target| { assert!(!target.join("file1").exists()); },
    |_, target| expected_manifest!({ target.join("file1") => ManifestType::File { hash: calculate_file_hash(&target.join("file1")).unwrap() } }),
    |_, _| expected_manifest!();
    "cleanup managed file")]
    #[test_case(|_, target| {
        File::create(target.join("file1")).unwrap();
        symlink(target.join("file1"), target.join("file2")).unwrap();
        File::create(target.join("file3")).unwrap();
        File::create(target.join("file4")).unwrap();
        vec![]
    },
    |_, target| {
        assert!(!target.join("file2").exists());
        assert!(!target.join("file3").exists());
        assert!(target.join("file4").exists());
    },
    |_, target| expected_manifest!({
        target.join("file2") => ManifestType::Link { source: target.join("file1") },
        target.join("file5") => ManifestType::Link { source: PathBuf::new() },
        target.join("file3") => ManifestType::File { hash: calculate_file_hash(&target.join("file3")).unwrap() },
        target.join("file4") => ManifestType::File { hash: String::new() },
    }),
    |_, _| expected_manifest!();
    "cleanup mixed symlink file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Link, permission: Permissions::from(Octal::default()) } ]
    },
    |_, target| { assert!(target.join("file2").exists() && target.join("file2").is_symlink()); },
    |_, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: PathBuf::new() } }),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } });
    "removed managed file")]
    #[test_case(|source, target| {
        File::create(source.join("file1")).unwrap();
        vec![ PortalMapping { source: source.join("file1"), target: target.join("file2"), file_type: FileType::Link, permission: Permissions::from(Octal::try_from("600".to_string()).unwrap()) } ]
    },
    |_, target| {
        assert_eq!(target.join("file2").metadata().unwrap().mode(), 0o100600); },
    |_, _| expected_manifest!(),
    |source, target| expected_manifest!({ target.join("file2") => ManifestType::Link { source: source.join("file1") } });
    "set mode")]


format where you see fit