code: @SuppressWarnings("unchecked")
      public static <T> Randomizer<T> asRandomizer(final Supplier<T> supplier) {
  
          class RandomizerProxy implements InvocationHandler {
  
              private final Supplier<?> target;
  
              private RandomizerProxy(final Supplier<?> target) {
                  this.target = target;
              }
  
              @Override
              public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
                  if ("getRandomValue".equals(method.getName())) {
                      Method getMethod = target.getClass().getMethod("get");
                      getMethod.setAccessible(true);
                      return getMethod.invoke(target);
                  }
                  return null;
              }
          }
  
          return (Randomizer<T>) Proxy.newProxyInstance(
                  Randomizer.class.getClassLoader(),
                  new Class[]{Randomizer.class},
                  new RandomizerProxy(supplier));
      }
docs: Create a dynamic proxy that adapts the given {@link Supplier} to a {@link Randomizer}.
  @param supplier to adapt
  @param <T> target type
  @return the proxy randomizer