code: def test_decorator(self, mocker, mock_app):
      def return_zero(func):
          return 0
  
      view = mocker.Mock()
      api = restplus.Api(mock_app)
      api.decorators.append(return_zero)
      api.output = mocker.Mock()
      api.add_resource(view, "/foo", endpoint="bar")
  
      mock_app.add_url_rule.assert_called_with("/foo", view_func=0)
  
imports: from __future__ import unicode_literals
  import flask
  import pytest
  import six
  from json import dumps, JSONEncoder
  from flask import Blueprint, redirect, views
  from werkzeug.exceptions import HTTPException, Unauthorized, BadRequest
  import flask_restplus
label_desc: Use image node_id 16 for calling the APITest obj's underlying member method code with example usage: obj.test_decorator(mocker, mock_app) and returns: int