Helper Method for Generating Stubbed ICommand in Rhino Mocks This helper method is designed to make stubbing ICommands simpler.  

Do you see any problems with this implementation?

public static ICommand GenerateCommandStub(
    Action&lt;object&gt; executeAction = null, 
    Func&lt;object, bool&gt; canExecuteFunc = null)
{
    var commandStub = MockRepository.GenerateStub&lt;ICommand&gt;();
    commandStub.Stub(command =&gt; command.Execute(Arg&lt;object&gt;.Is.Anything))
        .Do(executeAction ?? (_ =&gt; { }));
    commandStub.Stub(command =&gt; command.CanExecute(Arg&lt;object&gt;.Is.Anything))
        .Do(canExecuteFunc ?? (_ =&gt; true));
    return commandStub;
}
It looks fine to me, although I would personally prefer to have method chaining rather than optional parameters just for semantic purposes. Are your arguments meant to be weakly typed (using object)? If I could, I would change that to something strongly typed, but that is out of scope for this question.