static KiePMMLClusteringField getKiePMMLClusteringField(ClusteringField clusteringField) {
        double fieldWeight = clusteringField.getFieldWeight() == null ? 1.0 :
                clusteringField.getFieldWeight().doubleValue();
        boolean isCenterField =
                clusteringField.getCenterField() == null || clusteringField.getCenterField() == ClusteringField.CenterField.TRUE;
        KiePMMLCompareFunction kiePMMLCompareFunction = clusteringField.getCompareFunction() != null ? compareFunctionFrom(clusteringField.getCompareFunction()) : null;
        return new KiePMMLClusteringField(clusteringField.getField(), fieldWeight, isCenterField,
                                          kiePMMLCompareFunction, null);
    }
@Test
    void getKiePMMLClusteringField() {
        ClusteringField clusteringField = new ClusteringField();
        final Random random = new Random();
        clusteringField.setField("TEXT");
        clusteringField.setFieldWeight(random.nextDouble());
        clusteringField.setCenterField(getRandomEnum(ClusteringField.CenterField.values()));
        clusteringField.setCompareFunction(getRandomEnum(CompareFunction.values()));
        KiePMMLClusteringField retrieved = KiePMMLClusteringModelFactory.getKiePMMLClusteringField(clusteringField);
        commonEvaluateKiePMMLClusteringField(retrieved, clusteringField);
    }