    /**    * @ngdoc method    * @name ngMock.$httpBackend#when    * @methodOf ngMock.$httpBackend    * @description    * Creates a new backend definition.    *    * @param {string} method HTTP method.    * @param {string|RegExp} url HTTP url.    * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives    *   data string and returns true if the data is as expected.    * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header    *   object and returns true if the headers match the current definition.    * @returns {requestHandler} Returns an object with `respond` method that control