public static KiePMMLTransformationDictionary getKiePMMLTransformationDictionary(final TransformationDictionary toConvert,
                                                                                     final List<Field<?>> fields) {
        final List<KiePMMLDerivedField> kiePMMLDerivedFields = getKiePMMLDerivedFields(toConvert.getDerivedFields(),
                                                                                       fields);
        final List<KiePMMLDefineFunction> kiePMMLDefineFunctions =
                getKiePMMLDefineFunctions(toConvert.getDefineFunctions());
        return KiePMMLTransformationDictionary.builder(UUID.randomUUID().toString(), getKiePMMLExtensions(toConvert.getExtensions()))
                .withDefineFunctions(kiePMMLDefineFunctions)
                .withDerivedFields(kiePMMLDerivedFields)
                .build();
    }
@Test
    void getKiePMMLTransformationDictionary() {
        final TransformationDictionary toConvert = getRandomTransformationDictionary();
        KiePMMLTransformationDictionary retrieved =
                KiePMMLTransformationDictionaryInstanceFactory.getKiePMMLTransformationDictionary(toConvert,
                        Collections.emptyList());
        assertThat(retrieved).isNotNull();

        List<DerivedField> derivedFields = toConvert.getDerivedFields();
        List<KiePMMLDerivedField> derivedFieldsToVerify = retrieved.getDerivedFields();
        assertThat(derivedFieldsToVerify).hasSameSizeAs(derivedFields);
        derivedFields.forEach(derivedFieldSource -> {
            Optional<KiePMMLDerivedField> derivedFieldToVerify =
                    derivedFieldsToVerify.stream().filter(param -> param.getName().equals(derivedFieldSource.getName()))
                            .findFirst();
            assertThat(derivedFieldToVerify).isPresent();
            commonVerifyKiePMMLDerivedField(derivedFieldToVerify.get(), derivedFieldSource);
        });

        List<DefineFunction> defineFunctions = toConvert.getDefineFunctions();
        List<KiePMMLDefineFunction> defineFunctionsToVerify = retrieved.getDefineFunctions();
        assertThat(defineFunctionsToVerify).hasSameSizeAs(defineFunctions);
        defineFunctions.forEach(defineFunctionSource -> {
            Optional<KiePMMLDefineFunction> defineFunctionToVerify =
                    defineFunctionsToVerify.stream().filter(param -> param.getName().equals(defineFunctionSource.getName()))
                            .findFirst();
            assertThat(defineFunctionToVerify).isPresent();
            commonVerifyKiePMMLDefineFunction(defineFunctionToVerify.get(), defineFunctionSource);
        });
    }