public static int getSize(Object object) {
        if (object == null) {
            return 0;
        }
        if (object instanceof Collection<?>) {
            return ((Collection<?>) object).size();
        } else if (object instanceof Map<?, ?>) {
            return ((Map<?, ?>) object).size();
        } else if (object.getClass().isArray()) {
            return Array.getLength(object);
        } else {
            return -1;
        }
    }
@Test
    void testGetSize() {
        Assertions.assertEquals(0, ClassUtils.getSize(null));
        List<Integer> list = new ArrayList<>();
        list.add(1);
        Assertions.assertEquals(1, ClassUtils.getSize(list));
        Map map = new HashMap();
        map.put(1, 1);
        Assertions.assertEquals(1, ClassUtils.getSize(map));
        int[] array = new int[1];
        Assertions.assertEquals(1, ClassUtils.getSize(array));
        Assertions.assertEquals(-1, ClassUtils.getSize(new Object()));
    }