code: private static <T, R> Function<T, R> doThrow(Supplier<? extends RuntimeException> exceptionSupplier) {
      return t -> {
        throw exceptionSupplier.get();
      };
    }
docs: Returns a function that throws the exception supplied by the given supplier.
  
  @param exceptionSupplier the supplier to supply the exceptions to throw
  @return a function that throws exceptions regardless the input