public static <T> Consumer<T> spy(Consumer<T> consumer, Box<T> param) {
        return new CapturingConsumer<T>(consumer, param);
    }
public static < T > Consumer < T > spy ( Consumer < T > consumer , Box < T > param ) { return new CapturingConsumer < T > ( consumer , param ) ; }
Proxies an consumer spying for parameter.

@param <T> the consumer parameter type
@param consumer the consumer to be spied
@param param a box that will be containing the spied parameter
@return the proxied consumer