@Test
    public void typeEquals() throws Exception {
        Method f = BeanUtilsTest.class.getMethod("f");
        Method f1 = BeanUtilsTest.class.getMethod("f1");
        Method f2 = BeanUtilsTest.class.getMethod("f2");
        Method f3 = BeanUtilsTest.class.getMethod("f3");
        Method f4 = BeanUtilsTest.class.getMethod("f4");

        Type actualTypeArgument0 = ((ParameterizedType) f.getGenericReturnType()).getActualTypeArguments()[0];
        Type actualTypeArgument1 = ((ParameterizedType) f1.getGenericReturnType()).getActualTypeArguments()[0];
        assertTrue(BeanUtils.equals(actualTypeArgument0, actualTypeArgument1));
        assertFalse(BeanUtils.equals(actualTypeArgument0, Object.class));
        assertFalse(BeanUtils.equals(f.getGenericReturnType(), Object.class));
        assertFalse(BeanUtils.equals(new BeanUtils.GenericArrayTypeImpl(Object.class), Object.class));
        assertFalse(BeanUtils.equals(f2.getGenericReturnType(), f3.getGenericReturnType()));
        assertFalse(BeanUtils.equals(f2.getGenericReturnType(), Object.class));
        assertFalse(BeanUtils.equals(f2.getGenericReturnType(), f4.getGenericReturnType()));
    }
note

@author kon, created on 2022/4/27T11:04.
@version 1.0.0-SNAPSHOT
core/src/test/java/com/alibaba/fastjson2/util/BeanUtilsTest.java