answer.setMethod(method);
// check there is a method with the given name, and leverage BeanInfo for that
BeanInfo info = new BeanInfo(routeContext.getCamelContext(), bean.getClass());
if (!info.hasMethod(method)) {
throw ObjectHelper.wrapRuntimeCamelException(new MethodNotFoundException(null, bean, method));
}
}
return answer;
}