### Question:
ClassUtils { public static Class<?> getGenericTypeFromBean(Object object) { Class<?> clazz = object.getClass(); if (AopUtils.isAopProxy(object)) { clazz = AopUtils.getTargetClass(object); } return getGenericType(clazz); } private  ClassUtils(); static Class<?> getGenericTypeFromBean(Object object); static Class<?> getGenericType(Class<?> clazz); static Class<?> getGenericType(Class<?> clazz, int index);  }### Answer:
@Test public void testGetGenericTypeFromBean() { Assertions.assertThat(ClassUtils.getGenericTypeFromBean(new Object())).isNull(); Assertions.assertThat(ClassUtils.getGenericTypeFromBean(new SampleResource())).isNull(); Assertions.assertThat(ClassUtils.getGenericTypeFromBean(new SampleResourceArrayList()).getName()).isEqualTo( SampleResource.class.getName()); }