title: check if inner method is being called in angular jasmine test case
body: <p>I'm learning to write test cases using jasmine for my angular application,stuck in a particular scenario I have a function inside a component that calls other private function/methods the function is as below</p>
  <pre><code> public rPage() {
      this.setData(); // private method 
      this.setPage(); // private method
    }
  </code></pre>
  <p>I wrote the test case to test it as below</p>
  <pre><code> it('should call setData from RPage', () =&gt; {
      //@ts-ignore
      const spy = spyOn(component, 'setData');
      component.rPage();
      fixture.detectChanges();
      expect(spy).toHaveBeenCalled();
    });
  </code></pre>
  <p>but when i run ng test the test case fails and says 'Expected spy setData to have been called. what changes should I implement to pass the test case</p>