static Object invoke(Object target, Capability capability, Class<?> capabilityToEnrich) {
    return Arrays.stream(capability.getClass().getMethods())
        .filter(method -> method.getName().equals("enrich"))
        .filter(method -> method.getReturnType().isAssignableFrom(capabilityToEnrich))
        .findFirst()
        .map(
            method -> {
              try {
                return method.invoke(capability, target);
              } catch (IllegalAccessException
                  | IllegalArgumentException
                  | InvocationTargetException e) {
                throw new RuntimeException("Unable to enrich " + target, e);
              }
            })
        .orElse(target);
  }
Capabilities expose core feign artifacts to implementations so parts of core can be customized
around the time the client being built.

<p>For instance, capabilities take the {@link Client}, make changes to it and feed the modified
version back to feign.

@see Metrics5Capability
core/src/main/java/feign/Capability.java