title: Can't resolve all parameters for Router: (?, ?, ?, ?, ?, ?, ?) in Angular RC 5 when unit testing
body: <p>I just upgraded to Angular RC 5 and now all component that uses 'ROUTER_DIRECTIVES' fails with 'Can't resolve all parameters for Router: (?, ?, ?, ?, ?, ?, ?)' when I try to unit test the component. </p>
  
  <pre><code>import { inject, addProviders } from '@angular/core/testing';
  import { ComponentFixture, TestComponentBuilder } from '@angular/core/testing';
  import { Component } from '@angular/core';
  import { ROUTER_DIRECTIVES, Router } from '@angular/router';
  
  import { HomeComponent } from './home.component';
  import { UserService } from '../_services/user.service';
  
  describe('Component: Home', () =&gt; {
  
    beforeEach(() =&gt; {
      addProviders([HomeComponent, UserService, ROUTER_DIRECTIVES, Router]);
    });  
  
    it('should inject the component', inject([HomeComponent, UserService, ROUTER_DIRECTIVES, Router],
      (component: HomeComponent) =&gt; {
        expect(component).toBeTruthy();
        // expect(component.currentUser.firstname).toEqual('Jan');
      }));
  </code></pre>
  
  <p>The full error log: </p>
  
  <pre><code>     Chrome 52.0.2743 (Windows 10 0.0.0)
     Error: Can't resolve all parameters for Router: (?, ?, ?, ?, ?, ?, ?).
         at new BaseException (webpack:///C:/ng/anbud/~/@angular/compiler/src/facade/exceptions.js:27:0 &lt;- src/test.ts:2943:23)
         at CompileMetadataResolver.getDependenciesMetadata (webpack:///C:/ng/anbud/~/@angular/compiler/src/metadata_resolver.js:551:0 &lt;- src/test.ts:24542:19)
         at CompileMetadataResolver.getTypeMetadata (webpack:///C:/ng/anbud/~/@angular/compiler/src/metadata_resolver.js:448:0 &lt;- src/test.ts:24439:26)
         at webpack:///C:/ng/anbud/~/@angular/compiler/src/metadata_resolver.js:594:0 &lt;- src/test.ts:24585:41
         at Array.forEach (native)
         at CompileMetadataResolver.getProvidersMetadata (webpack:///C:/ng/anbud/~/@angular/compiler/src/metadata_resolver.js:575:0 &lt;- src/test.ts:24566:19)
         at CompileMetadataResolver.getNgModuleMetadata (webpack:///C:/ng/anbud/~/@angular/compiler/src/metadata_resolver.js:305:0 &lt;- src/test.ts:24296:58)
         at RuntimeCompiler._compileComponents (webpack:///C:/ng/anbud/~/@angular/compiler/src/runtime_compiler.js:150:0 &lt;- src/test.ts:37986:47)
         at RuntimeCompiler._compileModuleAndAllComponents (webpack:///C:/ng/anbud/~/@angular/compiler/src/runtime_compiler.js:78:0 &lt;- src/test.ts:37914:37)
         at RuntimeCompiler.compileModuleAndAllComponentsSync (webpack:///C:/ng/anbud/~/@angular/compiler/src/runtime_compiler.js:52:0 &lt;- src/test.ts:37888:21)
  </code></pre>
  
  <p>Any ideas how to unit test components with routing? </p>