How to preserve THIS when calling a function in jasmine : I am writing tests for a service.

The snippet of the service I a testing is 

     getDesign(designId: number): Observable<any> {
        const params = new HttpParams().set('designId', String(designId));
        return this.http
            .get('/get-design', { params: params })
            .pipe(retry(1), map((res) => res['data'] || []), catchError(this.handleError));
    }

The snippet of spec file is:

     fit('getDesign should append params and return', () => {
        const response = {
            'success': true,
            'data': [{foo: 'bar'}],
            'metadata': {'version': '1.8.25', 'versionHash': '14e456e062583f176d25'},
            'total': 0,
            'message': []
        };
        // service.getDesign(42).subscribe((res) => {
        //     expect(res).toEqual([{foo: 'bar'}]);
        // });
        //
        // const call: TestRequest = httpMock.expectOne('/get-design?designId=42');
        // expect(call.request.method).toEqual('GET');
        // call.flush(response);

        doServiceTest(service.getDesign, response, 42, [{foo: 'bar'}],
            '/get-design?designId=42', 'POST');
    });

    function doServiceTest(myFunction: Function, myResponse, myParam, myExpected, myUrl, myMethod) {
        myFunction.bind(this);
        myFunction(myParam).subscribe((res) => {
           expect(res).toEqual(myExpected);
        });
        const call: TestRequest = httpMock.expectOne(myUrl);
        expect(call.request.method).toEqual(myMethod);
        call.flush(myResponse);
    }

The code which is commented out works just fine. I would prefer to use the other approach as I have multiple functions which vary only by "params" and "expected". 

But when I try this way I get an error of "TypeError: Cannot read property 'http' of undefined" which says to me that "this" reference is somehow lost. 

What am I doing wrong?