### Question:
Reflections { public static Object proxy(InvocationHandler handler, Collection<Class<?>> classes) { return proxy(handler, Conditions.nonNull(classes, "classes must not be null but can be empty").toArray(new Class<?>[] {})); } private  Reflections(); static Object proxy(InvocationHandler handler, Collection<Class<?>> classes); static Object proxy(InvocationHandler handler, Class<?>... classes); static T proxy(Class<T> proxy, InvocationHandler handler, Collection<Class<?>> classes); static T proxy(Class<T> proxy, InvocationHandler handler, Class<?>... classes); static Value<Method> method(Class<?> clazz, String method, Object... args); static Value<Method> methodElevated(Class<?> clazz, String method, Object... args); static Value<Object> invoke(Object instance, String method, Object... args); static Value<Object> invoke(Class<?> clazz, String method, Object... args); static Value<Object> invoke(Class<?> clazz, Object instance, String method, Object... args); static Value<Object> invoke(Method invoke, Object... args); static Value<Object> invoke(Object instance, Method invoke, Object... args); static Value<Field> field(Class<?> clazz, String name); static Value<Field> fieldElevated(Class<?> clazz, String name); static boolean setter(Object instance, String name, Object set); static boolean setter(Class<?> clazz, String name, Object set); static boolean setter(Class<?> clazz, Object instance, String name, Object set); static boolean setter(Field field, Object set); static boolean setter(Object instance, Field field, Object set); @SuppressWarnings("unchecked") static Value<T> getter(Object instance, String name); static Value<T> getter(Class<?> clazz, String name); @SuppressWarnings("unchecked") static Value<T> getter(Class<?> clazz, Object instance, String name); static Value<T> getter(Field field); @SuppressWarnings("unchecked") static Value<T> getter(Object instance, Field field); static Value<T> instance(String signature, Class<T> clazz, Object... args); static Value<T> instance(Class<T> clazz, Object... args); static Value<Class<?>> clazz(String name); static Value<Class<?>> clazz(String name, boolean init, ClassLoader loader);  }### Answer:
@Test public void proxyTest() { Proxy proxy = Reflections.proxy(Proxy.class, (proxy1, method, args) -> (args != null) ? 1 : "bar", Comparable.class); Assert.assertEquals("bar", proxy.foo()); Comparable<MyObject> comparable = (Comparable<MyObject>) proxy; Assert.assertEquals(1, comparable.compareTo(null)); }