static void populateSchemaWithConstraints(Schema toPopulate, SimpleTypeImpl t) {
        if (t.getAllowedValues() != null && !t.getAllowedValues().isEmpty()) {
            parseSimpleType(DMNOASConstants.X_DMN_ALLOWED_VALUES, toPopulate, t.getAllowedValuesFEEL(), t.getAllowedValues());
        }
        if (t.getTypeConstraint() != null && !t.getTypeConstraint().isEmpty()) {
            parseSimpleType(DMNOASConstants.X_DMN_TYPE_CONSTRAINTS, toPopulate, t.getTypeConstraintFEEL(), t.getTypeConstraint());
        }
    }
@Test
    void populateSchemaWithConstraintsForTypeConstraints() {
        List<String> enumBase = Arrays.asList("DMN", "PMML", "JBPMN", "DRL");
        List<Object> toEnum =
                enumBase.stream().map(toMap -> String.format("\"%s\"", toMap)).collect(Collectors.toUnmodifiableList());
        String typeConstraintsString = String.join(",",
                                                   toEnum.stream().map(toMap -> String.format("%s", toMap)).toList());
        SimpleTypeImpl toRead = getSimpleType(null, typeConstraintsString, FEEL_STRING, BuiltInType.STRING);
        AtomicReference<Schema> toPopulate = new AtomicReference<>(getSchemaForSimpleType(toRead));
        DMNTypeSchemas.populateSchemaWithConstraints(toPopulate.get(), toRead);
        assertEquals(enumBase.size(), toPopulate.get().getEnumeration().size());
        enumBase.forEach(en -> assertTrue(toPopulate.get().getEnumeration().contains(en)));
        assertTrue(toPopulate.get().getExtensions().containsKey(DMNOASConstants.X_DMN_TYPE_CONSTRAINTS));
        String retrieved =
                ((String) toPopulate.get().getExtensions().get(DMNOASConstants.X_DMN_TYPE_CONSTRAINTS)).replace(" ",
                                                                                                                "");
        assertEquals(typeConstraintsString, retrieved);

        toEnum = Arrays.asList(1, 3, 6, 78);
        typeConstraintsString = String.join(",", toEnum.stream().map(toMap -> String.format("%s", toMap)).toList());

        toRead = getSimpleType(null, typeConstraintsString, FEEL_NUMBER, BuiltInType.NUMBER);
        toPopulate.set(getSchemaForSimpleType(toRead));
        DMNTypeSchemas.populateSchemaWithConstraints(toPopulate.get(), toRead);
        assertEquals(toEnum.size(), toPopulate.get().getEnumeration().size());
        toEnum.stream().map(i -> BigDecimal.valueOf((int) i)).forEach(en -> assertTrue(toPopulate.get().getEnumeration().contains(en)));
        assertTrue(toPopulate.get().getExtensions().containsKey(DMNOASConstants.X_DMN_TYPE_CONSTRAINTS));
        retrieved = ((String) toPopulate.get().getExtensions().get(DMNOASConstants.X_DMN_TYPE_CONSTRAINTS)).replace(
                " ", "");
        assertEquals(typeConstraintsString, retrieved);
    }