title: How i can test callback in jasmine
body: <p>I have class SomeClass with method <code>SomeClass.fetch()</code></p>
  
  <pre><code>var repository = {
      get: function(obj) {
          //...
      }
  };
  
  var cache = false;
  
  var SomeClass = {
  
      init: function() {
          //...
      },
  
      fetch: function () {
          var _this = this;
  
          repository.get({
              method: 'getRecentDialogsList',
              success: function (result) {
                  if (!cache) {
                      _this.set(result);
                      _this.sort();
                      _this.trigger('fetch:success', _this);
                  }
  
                  _this.trigger('fetch:ajaxSuccess', _this);
              }
          });
      }
  }
  </code></pre>
  
  <p>How i can test whether <code>SomeClass.fetch()</code> and check have been called <code>this.set()</code>, <code>this.sort</code>, <code>this.trigger</code> with parameters?</p>