title: Unit Test nested service with subscription
body: <p>I'm trying to unit test a service that has a method that returns void but in which it calls another service and subscribes to it.
  The problem is I keep getting the error: <strong><em>this.secondService.getPage</em> is not a function.</strong>
  What am i doing wrong?</p>
  
  <p>this is how the service I'm testing looks like:</p>
  
  <pre><code>public jumpTo(arg1: any, arg2: any): void {
  
       this.secondService.getPage(arg01: any, arg02: any).subscribe(response =&gt; {
         // do stuff
       })
  
    }
  </code></pre>
  
  <p>while my spec file looks like this:</p>
  
  <pre><code>describe('NavigationService', () =&gt; {
      let navigation: NavigationService
      let secondServiceSpy: any
  
      beforeEach(() =&gt; {
  
          secondServiceSpy = jasmine.createSpyObj('SecondService', ['getPage'])
          TestBed.configureTestingModule({
              providers: [
                  NavigationService,
                  { provide: SecondService, useValue: secondServiceSpy }
              ]
          })
          navigation = TestBed.get(NavigationService)
      })
  
      it('should jump to another step', () =&gt; {
          navigation.jumpTo('value1', 'value2' )
          expect(secondServiceSpy.getPage).toHaveBeenCalled()
      })
  })
  </code></pre>