title: Injecting mock $state into an angular unit test
body: <p>I'm a relative weakling at Angular unit testing and I'm struggling mightily to bootstrap what strikes me as a simple unit test.</p>
  
  <p>My Class</p>
  
  <pre><code>class CampaignController {
      constructor($state) {
          this.$state = $state;
      }
  
      submit() {
          this.$state.transitionTo('some.state');
      }
  }
  export { CampaignController };
  </code></pre>
  
  <p>My Test</p>
  
  <pre><code>import { expect } from 'chai';
  import angular from 'angular';
  import { CampaignController } from './campaign.controller';
  
  let component;
  
  describe('campaign-controller', function() {
  
      var $state;
  
      beforeEach(inject(function (_$state_) {
          $state = _$state_;
          component = new CampaignController($state);
      }));
  
  
      it('should update state on submit', () =&gt; {
          component.submit();
          expect($state.current.name).to.be('some.state');
      });
  });
  </code></pre>
  
  <p>I end up getting this error</p>
  
  <pre><code>Error: [$injector:unpr] Unknown provider: $stateProvider &lt;- $state
  </code></pre>
  
  <p>What am I missing here?</p>