title: An issue with testing $resource service by $httpBackend
body: <p>I guess I miss something. Have spent some time trying to understand why my test is not working.</p>
  
  <p>The code.</p>
  
  <pre><code>angular.module('services')
      .factory('UserPreferencesService', ['$resource', function ($resource)
      {
          return $resource('/rest/user-preferences/:id', {},
          { getById: { method: "GET", params: { id:'@id'}} });
  
      }
  ]);
  </code></pre>
  
  <p>The test:</p>
  
  <pre><code>it('should get by Id', function() {
      //given
      var preferences = {language: "en"};
  
      httpBackend.whenGET('/rest/user-preferences/1').respond(preferences);
  
      //when
      service.getById( {id:1} ).$promise.then(function(result) {
  
          console.log("successssssssssssssssssssssssssssssssssssss");
  
       //then
       expect(result).toEqual(preferences);
      }, function() {
          console.log("something wrong");
      })
  });
  </code></pre>
  
  <p>It never triggers: "successssssssssssssssssssssssssssssssssssss". </p>
  
  <p>What did I miss?</p>