Use `BodyConsumer.class.isAssignableFrom(methodInfo.getMethod().getReturnType())` instead as handler class can use sub-class of BodyConsumer as return type.