def METHOD_NAME(make_stubber, role_arn, error_code):
    stepfunctions_client = boto3.client('stepfunctions')
    stepfunctions_stubber = make_stubber(stepfunctions_client)
    state_machine = StepFunctionsStateMachine(stepfunctions_client)
    state_machine.state_machine_arn = 'test-arn'
    definition = {'Comment': 'test-definition'}
    stepfunctions_stubber.stub_update_state_machine(
        state_machine.state_machine_arn, definition, role_arn, error_code=error_code)
    if error_code is None:
        state_machine.update(definition, role_arn)
    else:
        with pytest.raises(ClientError) as exc_info:
            state_machine.update(definition, role_arn)
        assert exc_info.value.response['Error']['Code'] == error_code