public static Object convertValue(final Object value, final Class<?> convertType) throws SQLFeatureNotSupportedException {
        ShardingSpherePreconditions.checkNotNull(convertType, () -> new SQLFeatureNotSupportedException("Type can not be null"));
        if (null == value) {
            return convertNullValue(convertType);
        }
        if (value.getClass() == convertType) {
            return value;
        }
        if (value instanceof LocalDateTime) {
            return convertLocalDateTimeValue((LocalDateTime) value, convertType);
        }
        if (value instanceof Timestamp) {
            return convertTimestampValue((Timestamp) value, convertType);
        }
        if (URL.class.equals(convertType)) {
            return convertURL(value);
        }
        if (value instanceof Number) {
            return convertNumberValue(value, convertType);
        }
        if (value instanceof Date) {
            return convertDateValue((Date) value, convertType);
        }
        if (value instanceof byte[]) {
            return convertByteArrayValue((byte[]) value, convertType);
        }
        if (boolean.class.equals(convertType)) {
            return convertBooleanValue(value);
        }
        if (String.class.equals(convertType)) {
            return value.toString();
        }
        try {
            return convertType.cast(value);
        } catch (final ClassCastException ignored) {
            throw new SQLFeatureNotSupportedException("getObject with type");
        }
    }
@Test
    void assertConvertNumberValueSuccess() throws SQLException {
        assertThat(ResultSetUtils.convertValue("1", String.class), is("1"));
        assertTrue((boolean) ResultSetUtils.convertValue(1, boolean.class));
        assertThat(ResultSetUtils.convertValue((byte) 1, byte.class), is((byte) 1));
        assertThat(ResultSetUtils.convertValue((short) 1, short.class), is((short) 1));
        assertThat(ResultSetUtils.convertValue(new BigDecimal("1"), int.class), is(1));
        assertThat(ResultSetUtils.convertValue(new BigDecimal("1"), long.class), is(1L));
        assertThat(ResultSetUtils.convertValue(new BigDecimal("1"), double.class), is(1.0D));
        assertThat(ResultSetUtils.convertValue(new BigDecimal("1"), float.class), is(1.0F));
        assertThat(ResultSetUtils.convertValue(new BigDecimal("1"), BigDecimal.class), is(new BigDecimal("1")));
        assertThat(ResultSetUtils.convertValue((short) 1, BigDecimal.class), is(new BigDecimal("1")));
        assertThat(ResultSetUtils.convertValue(new Date(0L), Date.class), is(new Date(0L)));
        assertThat(ResultSetUtils.convertValue((short) 1, Object.class), is(Short.valueOf("1")));
        assertThat(ResultSetUtils.convertValue((short) 1, String.class), is("1"));
        assertThat(ResultSetUtils.convertValue(1, Byte.class), is(Byte.valueOf("1")));
        assertThat(ResultSetUtils.convertValue(1, Short.class), is(Short.valueOf("1")));
        assertThat(ResultSetUtils.convertValue(1, Long.class), is(Long.valueOf("1")));
        assertThat(ResultSetUtils.convertValue(1, Double.class), is(Double.valueOf("1")));
        assertThat(ResultSetUtils.convertValue(1, Float.class), is(Float.valueOf("1")));
    }