title: Error in Angular 4.x Karma test "No Provider for FocusTrapFactory"
body: <p>I have a small Angular v4.x using Angluar Material 2.x
  It has a modal (using MdDialog) login component - and pretty much nothing else.
  All my tests are failing with:</p>
  
  <blockquote>
    <p>Failed: No provider for FocusTrapFactory! at injectionError
    (<a href="http://localhost:9876/base/src/test.ts?31c6eb17e2414560f8e07e35e9c56bebb408ba58:2074:86" rel="nofollow noreferrer">http://localhost:9876/base/src/test.ts?31c6eb17e2414560f8e07e35e9c56bebb408ba58:2074:86</a>)
    [angular]
        at noProviderError (<a href="http://localhost:9876/base/src/test.ts?31c6eb17e2414560f8e07e35e9c56bebb408ba58:2112:12" rel="nofollow noreferrer">http://localhost:9876/base/src/test.ts?31c6eb17e2414560f8e07e35e9c56bebb408ba58:2112:12</a>)
    [angular] ...</p>
  </blockquote>
  
  <p>my login.component.spec.ts is</p>
  
  <pre><code>import { async, ComponentFixture, TestBed } from '@angular/core/testing';
  import { FormsModule } from '@angular/forms';
  import { RouterTestingModule } from '@angular/router/testing';
  import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
  import { NoopAnimationsModule } from '@angular/platform-browser/animations';
  import { MdDialog, MdDialogContainer, MdInputContainer, OVERLAY_PROVIDERS } from '@angular/material';
  import { HttpModule } from '@angular/http';
  import { AuthenticationService } from '../shared/servicesIndex';
  import { LoginComponent } from './login.component';
  
  describe('LoginComponent', () =&gt; {
      let component: LoginComponent;
      let fixture: ComponentFixture&lt;LoginComponent&gt;;
  
      beforeEach(async(() =&gt; {
          TestBed.overrideModule(BrowserDynamicTestingModule, {
              set: {
                  entryComponents: [MdDialogContainer]
              }
          });
          TestBed.configureTestingModule(
              {
              imports: [
                  FormsModule,
                  RouterTestingModule,
                  HttpModule,
                  NoopAnimationsModule
  
              ],
              declarations: [
                  LoginComponent,
                  MdInputContainer,
                  MdDialogContainer
              ],
              providers: [
                  MdDialog,
                  OVERLAY_PROVIDERS,
                  AuthenticationService
              ]
          })
              .compileComponents();
  
      }));
  
      beforeEach(() =&gt; {
          fixture = TestBed.createComponent(LoginComponent);
          component = fixture.componentInstance;
          fixture.detectChanges();
      });
  
      it('should create', () =&gt; {
          expect(component).toBeTruthy();
      });
  });
  </code></pre>
  
  <p>Logic tells me to import FocusTrapFactory and add it to my list of providers - but I can't find it to import it!</p>
  
  <p>I'm at a loss. My Google-fu is fu.</p>