title: How jasmine spyOn a generic method
body: <p>I try to make a spy on a generic method in typescript,<br>
  but cannot get Jasmine to recognise it.</p>
  
  <hr>
  
  <p>I have code</p>
  
  <pre><code>http: HttpClient &lt;- Not proper code, just showing type.
  ...
  this.http.get&lt;Customer[]&gt;(url);
  </code></pre>
  
  <p>where I want to mock the <code>get&lt;...&gt;</code> method.</p>
  
  <pre><code>const httpMock = {} as HttpClient;
  spyOn(httpMock, 'get')
     .and.returnValue(of({} as Customer[]));
  </code></pre>
  
  <p>But when I run the test I get</p>
  
  <blockquote>
    <p>Error:  : get() method does not exist<br>
    Usage: spyOn(, )</p>
  </blockquote>