code: def test_add_resource_endpoint(self, app, mocker):
      blueprint = Blueprint("test", __name__)
      api = restplus.Api(blueprint)
      view = mocker.Mock(
          **{"as_view.return_value.__name__": str("test_view")}
      )
      api.add_resource(view, "/foo", endpoint="bar")
      app.register_blueprint(blueprint)
      view.as_view.assert_called_with("bar", api)
  
imports: from __future__ import unicode_literals
  import flask
  from flask import Blueprint, request
  import flask_restplus
label_desc: Use image node_id 3 for calling the APIWithBlueprintTest obj's underlying member method code with example usage: obj.test_add_resource_endpoint(app, mocker) without return types