def METHOD_NAME(mocker, executable, args, src, expectedResult):
    """Test the status of the job after JobWrapper.execute().
    The returned value of JobWrapper.execute() is not checked as it can apparently be wrong depending on the shell used.
    """
    mocker.patch(
        "DIRAC.WorkloadManagementSystem.JobWrapper.JobWrapper.getSystemSection", side_effect=getSystemSectionMock
    )
    mocker.patch(
        "DIRAC.WorkloadManagementSystem.JobWrapper.Watchdog.getSystemInstance", side_effect=getSystemSectionMock
    )
    if src:
        shutil.copy(os.path.join(src, executable), executable)
    jw = JobWrapper()
    jw.jobArgs = {"Executable": executable}
    if args:
        jw.jobArgs["Arguments"] = args
    res = jw.execute()
    assert expectedResult in jw.jobReport.jobStatusInfo[-1]
    if src:
        os.remove(executable)
    if os.path.exists("std.out"):
        os.remove("std.out")