### Question:
UtilReflection { public static Class<?>[] getParamTypes(Object... arguments) { Check.notNull(arguments); final Collection<Object> types = new ArrayList<>(arguments.length); for (final Object argument : arguments) { if (argument.getClass() == Class.class) { types.add(argument); } else { types.add(argument.getClass()); } } final Class<?>[] typesArray = new Class<?>[types.size()]; return types.toArray(typesArray); } private  UtilReflection(); static T create(Class<T> type, Class<?>[] paramTypes, Object... params); @SuppressWarnings("unchecked") static T createReduce(Class<T> type, Object... params); static Class<?>[] getParamTypes(Object... arguments); @SuppressWarnings("unchecked") static Constructor<T> getCompatibleConstructor(Class<T> type, Class<?>... paramTypes); @SuppressWarnings("unchecked") static Constructor<T> getCompatibleConstructorParent(Class<T> type, Class<?>[] paramTypes); static T getMethod(Object object, String name, Object... params); static T getField(Object object, String name); static void setAccessible(AccessibleObject object, boolean accessible); static Collection<Class<?>> getInterfaces(Class<?> object, Class<?> base);  }### Answer:
@Test void testGetParamTypes() { final Collection<Object> params = new ArrayList<>(); params.add(Integer.valueOf(1)); params.add("test"); params.add(Double.valueOf(5.2)); params.add(Float.class); final Class<?>[] types = UtilReflection.getParamTypes(params.toArray()); assertEquals(Integer.class, types[0]); assertEquals(String.class, types[1]); assertEquals(Double.class, types[2]); assertEquals(Float.class, types[3]); }