title: Testing stateProvider state if configured in config in angularJS returns null on $state
body: <p>I have a config like this one:</p>
  
  <pre><code>angular.module('myModule', ['ui.router'])
  .config(['$stateProvider', function($stateProvider) {
    $stateProvider
      .state('app.home', {
        abstract: true,
        url: '/home',
        template: '&lt;div&gt;Foo Bar&lt;/div&gt;'
      });
  }]);
  </code></pre>
  
  <p>and a unit test using jasmine like this:</p>
  
  <pre><code>'use strict';
  
  describe('Module: myModule', function() {
    var $rootScope, $state;
  
    beforeEach(module('ui.router'));
    beforeEach(module('myModule'));
  
    beforeEach(inject(function(_$rootScope_, _$state_) {
      $state = _$state_;
      $rootScope = _$rootScope_;
    }));
  
    it('must have a route state for home', function(){
      console.log($state.get('app.home')); // this returns null
    });
  });
  </code></pre>
  
  <p>However I could not get the state in the config to show up on the array returned by <code>$state.get()</code></p>
  
  <p>I also checked and the file containing the config is loaded and it is there.
  Can anyone say what I am doing wrong? Basically I just want to test if the states I am expecting are existing in the config of "myModule"</p>