@Override
  public Object invoke(final Object proxy, final Method method, final Object[] args) {
    switch (method.getName()) {
      case "equals":
        final Object otherHandler =
            args.length > 0 && args[0] != null ? Proxy.getInvocationHandler(args[0]) : null;
        return equals(otherHandler);
      case "hashCode":
        return hashCode();
      case "toString":
        return toString();
      default:
        if (isReturnsFuture(method)) {
          return invokeRequestMethod(method, args);
        } else {
          final String message =
              String.format(
                  "Method %s of contract %s doesn't return io.vertx.core.Future",
                  method.getName(), method.getDeclaringClass().getSimpleName());
          throw new FeignException(-1, message);
        }
    }
  }
{@link InvocationHandler} implementation that transforms calls to methods of feign contract into
asynchronous HTTP requests via vertx.

@author Alexei KLENIN
vertx/feign-vertx/src/main/java/feign/VertxInvocationHandler.java