public static KiePMMLLocalTransformations getKiePMMLLocalTransformations(final LocalTransformations localTransformations,
                                                                      final List<Field<?>> fields) {
        final List<KiePMMLDerivedField> kiePMMLDerivedFields =
                localTransformations.getDerivedFields().stream()
                        .map(derivedField -> getKiePMMLDerivedField(derivedField, fields))
                        .collect(Collectors.toList());
        return KiePMMLLocalTransformations.builder(UUID.randomUUID().toString(), Collections.emptyList())
                .withDerivedFields(kiePMMLDerivedFields)
                .build();
    }
@Test
    void getKiePMMLLocalTransformations() {
        final LocalTransformations toConvert = getRandomLocalTransformations();
        KiePMMLLocalTransformations retrieved =
                KiePMMLLocalTransformationsInstanceFactory.getKiePMMLLocalTransformations(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);
        });
    }