/**
   * Applies the configured {@link UriComponentsContributor}s to the given {@link
   * UriComponentsBuilder}.
   *
   * @param builder will never be {@literal null}.
   * @param invocation will never be {@literal null}.
   * @return
   */
  protected UriComponentsBuilder applyUriComponentsContributer(
      UriComponentsBuilder builder, MethodInvocation invocation) {

    MethodParameters parameters = new MethodParameters(invocation.getMethod());
    Iterator<Object> parameterValues = Arrays.asList(invocation.getArguments()).iterator();

    for (MethodParameter parameter : parameters.getParameters()) {
      Object parameterValue = parameterValues.next();
      for (UriComponentsContributor contributor : uriComponentsContributors) {
        if (contributor.supportsParameter(parameter)) {
          contributor.enhance(builder, parameter, parameterValue);
        }
      }
    }

    return builder;
  }