Support optional parameters with mocks