public static Object convertValueType(Value value) {
        if (value == null) {
            return null;
        }

        if (value instanceof StringValue) {
            return ((StringValue) value).getValue();
        } else if (value instanceof IntValue) {
            return ((IntValue) value).getValue();
        } else if (value instanceof LongValue) {
            return ((LongValue) value).getValue();
        } else if (value instanceof DoubleValue) {
            return ((DoubleValue) value).getValue();
        } else if (value instanceof FloatValue) {
            return ((FloatValue) value).getValue();
        } else if (value instanceof BooleanValue) {
            return ((BooleanValue) value).getValue();
        } else if (value instanceof ByteValue) {
            return ((ByteValue) value).getValue();
        } else if (value instanceof ShortValue) {
            return ((ShortValue) value).getValue();
        } else if (value instanceof CharValue) {
            return ((CharValue) value).getValue();
        } else {
            throw new IllegalArgumentException("Object is no primitive Java type.");
        }
    }
@Test
    void testValueToJavaConversion() {
        assertThat(JavaToValueConverter.convertValueType(null)).isNull();

        assertThat(JavaToValueConverter.convertValueType(new StringValue("123Test")))
                .isEqualTo("123Test");
        assertThat(JavaToValueConverter.convertValueType(new ByteValue((byte) 44)))
                .isEqualTo((byte) 44);
        assertThat(JavaToValueConverter.convertValueType(new ShortValue((short) 10000)))
                .isEqualTo((short) 10000);
        assertThat(JavaToValueConverter.convertValueType(new IntValue(3567564))).isEqualTo(3567564);
        assertThat(JavaToValueConverter.convertValueType(new LongValue(767692734)))
                .isEqualTo(767692734L);
        assertThat(JavaToValueConverter.convertValueType(new FloatValue(17.5f))).isEqualTo(17.5f);
        assertThat(JavaToValueConverter.convertValueType(new DoubleValue(3.1415926)))
                .isEqualTo(3.1415926);
        assertThat((Boolean) JavaToValueConverter.convertValueType(new BooleanValue(true)))
                .isTrue();
        assertThat(JavaToValueConverter.convertValueType(new CharValue('@'))).isEqualTo('@');

        assertThatThrownBy(() -> JavaToValueConverter.convertValueType(new MyValue()))
                .isInstanceOf(IllegalArgumentException.class);
    }