def METHOD_NAME(make_stubber, error_code):
    stepfunctions_client = boto3.client('stepfunctions')
    stepfunctions_stubber = make_stubber(stepfunctions_client)
    state_machine = StepFunctionsStateMachine(stepfunctions_client)
    run_arn = 'test-run_arn'
    cause = 'test cause'
    stepfunctions_stubber.stub_stop_execution(run_arn, cause, error_code=error_code)
    if error_code is None:
        state_machine.stop_run(run_arn, cause)
    else:
        with pytest.raises(ClientError) as exc_info:
            state_machine.stop_run(run_arn, cause)
        assert exc_info.value.response['Error']['Code'] == error_code