title: How to override mocked response of $httpBackend in Angular?
body: <p>Is is possible to override or re-define mocked response in mocked $httpBackend?</p>
  
  <p>I have test like this:</p>
  
  <pre><code>beforeEach(inject(function ($rootScope, $controller, _$httpBackend_) {
    $httpBackend = _$httpBackend_;
  
    //Fake Backend
    $httpBackend.when('GET', '/myUrl').respond({}); //Empty data from server
    ...some more fake url responses...     
   }
  </code></pre>
  
  <p>This is fine for most cases but I have few tests where I need to return something different for the same URL. But it seems that once the when().respond() is defined I can not change it afterwards in code like this:</p>
  
  <p>Different response in a single specific test:</p>
  
  <pre><code>it('should work', inject(function($controller){
    $httpBackend.when('GET', '/myUrl').respond({'some':'very different value with long text'})
  
    //Create controller
  
    //Call the url
  
    //expect that {'some':'very different value with long text'} is returned
    //but instead I get the response defined in beforeEach
  }));
  </code></pre>
  
  <p>How do I do that?
  My code is now untestable :(</p>