### Question:
ClassUtils { public static String getSizeMethod(Class<?> cls) { try { return cls.getMethod("size", new Class<?>[0]).getName() + "()"; } catch (NoSuchMethodException e) { try { return cls.getMethod("length", new Class<?>[0]).getName() + "()"; } catch (NoSuchMethodException e2) { try { return cls.getMethod("getSize", new Class<?>[0]).getName() + "()"; } catch (NoSuchMethodException e3) { try { return cls.getMethod("getLength", new Class<?>[0]).getName() + "()"; } catch (NoSuchMethodException e4) { return null; } } } } } private  ClassUtils(); static Object newInstance(String name); static Class<?> forName(String[] packages, String className); static Class<?> forName(String className); static Class<?> classForName(String className); static Class<?> getBoxedClass(Class<?> type); static Boolean boxed(boolean v); static Character boxed(char v); static Byte boxed(byte v); static Short boxed(short v); static Integer boxed(int v); static Long boxed(long v); static Float boxed(float v); static Double boxed(double v); static Object boxed(Object v); static boolean unboxed(Boolean v); static char unboxed(Character v); static byte unboxed(Byte v); static short unboxed(Short v); static int unboxed(Integer v); static long unboxed(Long v); static float unboxed(Float v); static double unboxed(Double v); static Object unboxed(Object v); static boolean isNotEmpty(Object object); static int getSize(Object object); static URI toURI(String name); static Class<?> getGenericClass(Class<?> cls); static Class<?> getGenericClass(Class<?> cls, int i); static boolean isBeforeJava5(String javaVersion); static boolean isBeforeJava6(String javaVersion); static String toString(Throwable e); static void checkBytecode(String name, byte[] bytecode); static String getSizeMethod(Class<?> cls); static String getMethodName(Method method, Class<?>[] parameterClasses, String rightCode); static Method searchMethod(Class<?> currentClass, String name, Class<?>[] parameterTypes); static String getInitCode(Class<?> type); static Map<K, V> toMap(Map.Entry<K, V>[] entries); static final String CLASS_EXTENSION; static final String JAVA_EXTENSION; }### Answer:
@Test public void testGetSizeMethod() { Assertions.assertEquals("getLength()", ClassUtils.getSizeMethod(GenericClass3.class)); }