### Question:
ReflectionUtils { public static Class<?>[] toClass(Object... array) { if (array == null) { return null; } else if (array.length == 0) { return EMPTY_CLASS_ARRAY; } Class<?>[] classes = new Class[array.length]; for (int i = 0; i < array.length; i++) { classes[i] = (array[i] == null) ? null : array[i].getClass(); } return classes; } private  ReflectionUtils(); @SuppressWarnings("unchecked") static Class<T> wrapPrimitive(Class<T> clazz); static Class<?>[] toClass(Object... array); static Object[] toArgs(Function<Class<?>, Object> valueSupplier, Class<?>... array); static T getDefault(Class<T> type); static Constructor<T> getConstructor(Class<T> cls, Class<?>... argsTypes); static Constructor<T> getConstructorOptional(int mandatoryCount, Class<T> cls, Class<?>... argsTypes); static T newInstance(Class<T> cls, Object... args); static T newInstanceOptionalArgs(Class<T> cls, Object... args); static T newInstanceOptionalArgs(int mandatoryCount, Class<T> cls, Object... args); static Object invoke(Method method, Object obj, Object... args); static Object get(Field field, Object obj); static void set(Field field, Object obj, Object value); static Class<?> getFirstGenericType(Field field); static Method getMethod(Class<?> declaringClass, String name, Class... types);  }### Answer:
@Test public void testToClass() { Object[] objects = {"test", 1, 2L, true, Integer.valueOf(3)}; Class<?>[] classes = ReflectionUtils.toClass(objects); assertThat(classes).containsExactly(String.class, Integer.class, Long.class, Boolean.class, Integer.class); assertThat(ReflectionUtils.toClass((Object[]) null)).isNull(); assertThat(ReflectionUtils.toClass(new Object[] {})).isEmpty(); }