def METHOD_NAME(self):
    with tempfile.TemporaryDirectory() as tmpdir:
        primary_file_lines = [
            "root:x:0:0:root:/root:/bin/bash\n",
            "bin:x:1:1:bin:/bin:/sbin/nologin\n",
            "daemon:x:2:2:daemon:/sbin:/sbin/nologin\n"
        ]
        secondary_file_lines = [
            "daemon:x:9:9:daemon:/sbin:/sbin/nologin\n"
            "lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin\n",
            "sync:x:5:0:sync:/sbin:/bin/sync\n"
        ]
        result_file_lines = [
            "root:x:0:0:root:/root:/bin/bash\n",
            "bin:x:1:1:bin:/bin:/sbin/nologin\n",
            "daemon:x:2:2:daemon:/sbin:/sbin/nologin\n",
            "lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin\n",
            "sync:x:5:0:sync:/sbin:/bin/sync\n"
        ]
        with open(os.path.join(tmpdir, "primary"), "w", encoding="utf8") as f:
            f.writelines(primary_file_lines)
        with open(os.path.join(tmpdir, "secondary"), "w", encoding="utf8") as f:
            f.writelines(secondary_file_lines)
        passwd = ostree.PasswdLike.from_file(os.path.join(tmpdir, "primary"))
        passwd.merge_with_file(os.path.join(tmpdir, "secondary"))
        passwd.dump_to_file(os.path.join(tmpdir, "result"))
        with open(os.path.join(tmpdir, "result"), "r", encoding="utf8") as f:
            self.assertEqual(sorted(f.readlines()), sorted(result_file_lines))