function expectParameterHint(expectedParams, expectedParameter) {
            var requestHints = undefined,
                request = null;
            
            function expectHint(hint) {
                var params = hint.parameters,
                    n = params.length,
                    i;

                // compare params to expected params
                expect(params.length).toBe(expectedParams.length);
                expect(hint.currentIndex).toBe(expectedParameter);

                for (i = 0; i < n; i++) {

                    expect(params[i].name).toBe(expectedParams[i].name);
                    expect(params[i].type).toBe(expectedParams[i].type);
                    if (params[i].isOptional) {
                        expect(expectedParams[i].isOptional).toBeTruthy();
                    } else {
                        expect(expectedParams[i].isOptional).toBeFalsy();
                    }
                }

            }
            
            runs(function () {
                request = phProvider._getParameterHint();
                
                if (expectedParams === null) {
                    request.fail(function (result) {
                        requestHints = result;
                    });

                    waitsForFail(request, "ParameterHints");
                } else {
                    request.done(function (result) {
                        requestHints = result;
                    });

                    waitsForDone(request, "ParameterHints");
                }
            });

            if (expectedParams === null) {
                expect(requestHints).toBe(null);
            } else {
                expectHint(requestHints);
            }
        }
Show a function hint based on the code at the cursor. Verify the
hint matches the passed in value.

@param {Array<{name: string, type: string, isOptional: boolean}>}
expectedParams - array of records, where each element of the array
describes a function parameter. If null, then no hint is expected.
@param {number} expectedParameter - the parameter at cursor.