static Object enrich(
      Object componentToEnrich, Class<?> capabilityToEnrich, List<Capability> capabilities) {
    return capabilities.stream()
        // invoke each individual capability and feed the result to the next one.
        // This is equivalent to:
        // Capability cap1 = ...;
        // Capability cap2 = ...;
        // Capability cap2 = ...;
        // Contract contract = ...;
        // Contract contract1 = cap1.enrich(contract);
        // Contract contract2 = cap2.enrich(contract1);
        // Contract contract3 = cap3.enrich(contract2);
        // or in a more compact version
        // Contract enrichedContract = cap3.enrich(cap2.enrich(cap1.enrich(contract)));
        .reduce(
            componentToEnrich,
            (target, capability) -> invoke(target, capability, capabilityToEnrich),
            (component, enrichedComponent) -> enrichedComponent);
  }
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