title: Jasmin SpyOn.and.returnValue() is not working with service call
body: <p>In component I have one method which is actually calling service method from inside and in that method I am subscribing result of service response.
  But while testing I used <code>SpyOn.and.returnValue</code> method so now it's not calling to service method but I am not getting response. It's always calling subscribe error block.</p>
  <p>Here is my Test file code:</p>
  <pre><code>it('should check getMVRData method', inject([WorkflowService, PersonalDataService], (workFlow: WorkflowService, personalDataService: PersonalDataService) =&gt; {
      let fixture = TestBed.createComponent(PersonalDataComponent);
      let inst = fixture.componentInstance;
      spyOn(personalDataService, 'getMVRData').and.returnValue(Observable.of(WORKFLOW_DATA));
      inst.getMVRData();
  
      // After sometime I am checking my console
      setTimeout(() =&gt; {
          console.log(inst.value);
          console.log(personalDataService.value)
  
      }, 1001);
  }));
  </code></pre>
  <p>Here is my component code:</p>
  <pre><code>// Get License Data
  value = 'subscribe data'
  getMVRData() {
      this.value = 'inside get mvr method';
      this._personalDataService.getMVRData().subscribe(response =&gt; {
          let data = JSON.parse(response._body);
          this.value = 'inside success';
      }, error =&gt; {
          // This block is calling always
          this.value = 'inside error'
      });
  }
  </code></pre>
  <p>Here is my service file method:</p>
  <pre><code>value: any;
  getMVRData(): Observable &lt; any &gt; {
      this.value = 'inside service';
      let action = this.mvrConfig['action'];
      return this._authHttp.get(AppConfig.API_ENDPOINT() + action + '/?t=' + new Date(), this.headerOptions)
          .map(this._extractData)
          .map(this._doAction)
          .catch(this._handleError);
  }
  </code></pre>
  <p>Service file method is not getting the call, that's working fine. But <code>returnValue</code> of <code>spyOn</code> function is not working properly.</p>