def METHOD_NAME(
    self,
    command,
    outputfile,
    exit_code,
    argument=None,
    version=None,
    extra=None,
    file_path=None,
):
    """Call a plugin with command and an optional argument,
    expect exit code and store output to outputfile
    """
    args = [self.apt_plugin, command]
    if argument:
        args.append(argument)
    if version:
        args.append("--module-version")
        args.append(version)
    if extra:
        # Does not happen in normal cases, just for testing
        args.append(extra)
    if file_path:
        args.append("--file")
        args.append(file_path)
    process = self.startProcess(
        command=self.sudo,
        arguments=args,
        stdouterr=outputfile,
        expectedExitStatus=f"=={exit_code}",
    )
    self.assertThat("value" + process.expectedExitStatus, value=process.exitStatus)