def METHOD_NAME(mocker, context_object, command, resource_name, definition_type):
    runner = CliRunner()
    mocker.patch.object(commands, "definitions")
    mocker.patch.object(commands, "ConnectorSpecificationRenderer", mocker.Mock())
    mock_renderer = commands.ConnectorSpecificationRenderer.return_value
    mock_renderer.write_yaml.return_value = "expected_output_path"
    result = runner.invoke(command, ["uuid", resource_name], obj=context_object)
    assert result.exit_code == 0
    assert result.output == f"✅ - Created the {definition_type} template for {resource_name} in expected_output_path.\n"
    commands.definitions.factory.assert_called_with(definition_type, context_object["API_CLIENT"], context_object["WORKSPACE_ID"], "uuid")
    commands.ConnectorSpecificationRenderer.assert_called_with(resource_name, commands.definitions.factory.return_value)
    mock_renderer.write_yaml.assert_called_with(project_path=".")