@SuppressWarnings("unchecked")
public <A extends Action<R>, R extends Result> ActionHandler<A, R> getActionHandler(A action) {
checkNotNull(action, "action must not be null");
ActionHandler<A, R> handler = (ActionHandler<A, R>) registry.get(action.getClass());
if(handler == null) {
throw new ActionHandlerNotFoundException(action);
}
return handler;
}