title: Unit Test Angular Pagination
body: <p>I use this in my header to GET all data, i parse (toJson) header in my controller:</p>
  
  <pre><code>X-Pagination:{"current_page":1,"per_page":10,"total_pages":16,"sub_count":10,"total_count":159}
  
  var parsingHeader = angular.fromJson(vms.headers('X-Pagination'));
            _this.current_page = parsingHeader.current_page;
            _this.per_page = parsingHeader.per_page;
            _this.total_pages = parsingHeader.total_pages;
            _this.total_count = parsingHeader.total_count;
  </code></pre>
  
  <p>I want to test this :</p>
  
  <pre><code>$httpBackend
        .whenGET('http://localhost:3000/vms.json?page=1')
        .respond(function(method, url, data, headers){
          ...
        });
  </code></pre>
  
  <p>I have some error : 
  'null' is not an object (evaluating 'parsingHeader.current_page'),...<br>
  What is the best process for Test this ?</p>