I am not sure about InvokeWithCustomArgs() but ACTION_P2(action,
params) will solve the problem in this case.
simply define this,
ACTION_P2(SimpleFunction, a, b)
{
// your logic in this function. SimpleFunction() will have access to
all the function arguments along with your custom arguments (a, b)
}
and use that action while expecting a call.
EXPECT_CALL(mock, method(_, _))
.WillOnce(SimpleFunction("hello", 3)));
hope that helps.