@Override
    public Object convert(String[] segments, int size, Class<?> targetType, Class<?> elementType) {

        Class<?> componentType = targetType.getComponentType();

        Converter converter = converterUtil.getConverter(String.class, componentType);

        Object array = newInstance(componentType, size);

        for (int i = 0; i < size; i++) {
            Array.set(array, i, converter.convert(segments[i]));
        }

        return array;
    }
@Test
    void testConvert() {
        assertTrue(deepEquals(new Integer[] {123}, converter.convert("123", Integer[].class, Integer.class)));
        assertTrue(deepEquals(new Integer[] {1, 2, 3}, converter.convert("1,2,3", Integer[].class, null)));
        assertNull(converter.convert("", Integer[].class, null));
        assertNull(converter.convert(null, Integer[].class, null));
    }