title: How to test angular2 dynamic routes
body: <p>I have one issue with angular2 testing. 
  I have some child component with theirs own routing, route config generated dynamically from service, and when I try to test this component I got error about 
  non exist getter (it`s normal). But how and where I should pass this getter into process of component creataion?</p>
  
  <p>My component</p>
  
  <pre><code>import {Component, Input} from 'angular2/core';
  import {RouteConfig, ROUTER_DIRECTIVES, Router} from 'angular2/router';
  /* ------- !Angular 2 native components  ---------*/
  import {routeGeneratorInstance} from '../../config/routes/route_instructions_generator';
  
  
  import {Config} from '../../config/config';
  /* ------- !Config  ---------*/
  
  const MODULE_PATH: string = `/${Config.getProdFolderName()}/modules/patients`;
  
  @Component({
    selector: 'patients',
    template: `
      &lt;router-outlet &gt;&lt;/router-outlet&gt;
    `,
    directives: [ROUTER_DIRECTIVES]
  })
  
  @RouteConfig(routeGeneratorInstance.getRoutesInstructions().patients)
  
  export class PatientsComponent {}
  </code></pre>
  
  <p>and my test</p>
  
  <pre><code>import {setBaseTestProviders} from 'angular2/testing';
  import {
  TEST_BROWSER_PLATFORM_PROVIDERS,
  TEST_BROWSER_APPLICATION_PROVIDERS
  } from 'angular2/platform/testing/browser';
  
  import { beforeEach,
  beforeEachProviders,
  describe,
  expect,
  provide,
  it,
  inject,
  injectAsync,
  TestComponentBuilder,
  AsyncTestCompleter} from 'angular2/testing';
  
  import {routeGeneratorInstance} from '../../config/routes/route_instructions_generator';
  import {PatientsComponent} from './patients.component';
  
  describe('Patients component test', () =&gt; {
  
    it('Should be able to test', injectAsync([TestComponentBuilder],
    (tcb: TestComponentBuilder) =&gt; {
      return tcb.createAsync(PatientsComponent).then((componentFixture) =&gt; {
        componentFixture.detectChanges();
        expect(true).toBe(true);
      });
    }));
  
  });
  </code></pre>
  
  <p>Got error:  <em>Cannot read property 'patients' of undefined</em></p>
  
  <p>I understand that I not passed this data into RouteConfig  when I simulate component creatin, but how and where to do this? Thanks for any help!</p>