function setUpMockMethod(mockControl, scope, funcName, parameters,
	return_values) {
  var mockMethod = mockControl.createMethodMock(scope, funcName);
  if (return_values) {
    for (var i = 0, return_value; return_value = return_values[i]; i++) {
      if (parameters && i < parameters.length) {
        mockMethod(parameters[i]).$returns(return_value);
      }
      else {
        mockMethod().$returns(return_value);
      }
    }
  }
  // If there are no return values but there are parameters, we are only
  // recording specific method calls.
  else if (parameters) {
    for (var i = 0; i < parameters.length; i++) {
      mockMethod(parameters[i]);
    }
  }
  mockMethod.$replay();
  return mockMethod;
}
Creates a controlled MethodMock. Sets the expected return values and
    the parameters if any exist. Sets the method to replay.
@param {!goog.testing.MockControl} mockControl Object that holds a set
   of mocks for this test.
@param {!Object} scope The scope of the method to be mocked out.
@param {!string} funcName The name of the function we're going to mock.
@param {Array<Object>} parameters The parameters to call the mock with.
@param {Array<!Object>} return_values The values to return when called.
@return {!goog.testing.MockInterface} The mocked method.