code: public static <T, R> Function<T, R> spy(Function<T, R> function, Box<R> result, Box<T> param) {
          return new CapturingFunction<>(function, result, param);
      }
docs: Proxies a function spying for result and parameter.
  
  @param <T> the function parameter type
  @param <R> the function result type
  @param function the function to be spied
  @param result a box that will be containing spied result
  @param param a box that will be containing spied param
  @return the proxied function