@Nullable
    public static ValueReference of(Object value) {
        if (value instanceof Boolean) {
            return of((Boolean) value);
        } else if (value instanceof Double) {
            return of((Double) value);
        } else if (value instanceof Float) {
            return of((Float) value);
        } else if (value instanceof Integer) {
            return of((Integer) value);
        } else if (value instanceof Long) {
            return of((Long) value);
        } else if (value instanceof String) {
            return of((String) value);
        } else if (value instanceof Enum) {
            return of((Enum) value);
        } else if (value instanceof EncryptedValue encryptedValue) {
            return of(encryptedValue);
        } else {
            return null;
        }
    }
@Test
    public void deserializeEnum() throws IOException {
        assertThat(objectMapper.readValue("{\"@type\":\"string\",\"@value\":\"A\"}", ValueReference.class)).isEqualTo(ValueReference.of(TestEnum.A));
        assertThat(objectMapper.readValue("{\"@type\":\"string\",\"@value\":\"B\"}", ValueReference.class)).isEqualTo(ValueReference.of(TestEnum.B));
    }