static KiePMMLComparisonMeasure getKiePMMLComparisonMeasure(ComparisonMeasure comparisonMeasure) {
        return new KiePMMLComparisonMeasure(comparisonMeasureKindFrom(comparisonMeasure.getKind()),
                                            aggregateFunctionFrom(comparisonMeasure.getMeasure()),
                                            compareFunctionFrom(comparisonMeasure.getCompareFunction()));

    }
@Test
    void getKiePMMLComparisonMeasure() {
        ComparisonMeasure comparisonMeasure = new ComparisonMeasure();
        getRandomEnum(ComparisonMeasure.Kind.values());
        comparisonMeasure.setKind(getRandomEnum(ComparisonMeasure.Kind.values()));
        comparisonMeasure.setCompareFunction(getRandomEnum(CompareFunction.values()));
        Random random = new Random();
        comparisonMeasure.setMinimum(random.nextInt(10));
        comparisonMeasure.setMaximum(comparisonMeasure.getMinimum().intValue() + random.nextInt(10));
        comparisonMeasure.setMeasure(new Euclidean());
        KiePMMLComparisonMeasure retrieved =
                KiePMMLClusteringModelFactory.getKiePMMLComparisonMeasure(comparisonMeasure);
        assertThat(retrieved.getAggregateFunction()).isEqualTo(KiePMMLAggregateFunction.EUCLIDEAN);
        commonEvaluateKiePMMLComparisonMeasure(retrieved, comparisonMeasure);
    }