// Perform the action here, rather than while processing events so
// that the expectation will be satisfied before any additional
// events are generated by this action.
MethodAction action = ((MethodInvocationEvent) methodCall).getAction();
if (action != null) {
return action.perform(methodCall);
}
return null;
}