title: OverrideComponent with TestBed
body: <p>I have <code>MainComponent</code> that uses <code>ChildComponentA</code> as a <code>@ViewChild</code>. <code>MainComponent</code> is calling a method on <code>ChildComponentA</code>.</p>
  
  <p>I want to write an unit test case mocking <code>ChildComponentA</code>. How can I do this using <code>TestBed</code> (in Angular 2 RC5)?</p>
  
  <p>Before I used to use <code>overrideDirective(MainComponentName, ChildComponentA, MockChildComponentA);</code> Is there an equivalent to this using <code>TestBed</code>?</p>
  
  <p>I tried using</p>
  
  <pre><code>TestBed.overrideComponent(ChildComponentA,{
          set: {
            template: '&lt;div&gt;&lt;/div&gt;'
          }
        }); 
  </code></pre>
  
  <p>which just sets the template, but I want to mock the methods in the component as well.</p>