static DataType getTargetDataType(final MiningFunction miningFunction, final MathContext mathContext) {
        switch (miningFunction) {
            case REGRESSION:
                return DataType.fromValue(mathContext.value());
            case CLASSIFICATION:
            case CLUSTERING:
                return DataType.STRING;
            default:
                return null;
        }
    }
@Test
    void getTargetDataType()  {
        MiningFunction miningFunction = MiningFunction.REGRESSION;
        MathContext mathContext = MathContext.DOUBLE;
        DataType retrieved = KiePMMLUtil.getTargetDataType(miningFunction, mathContext);
        assertThat(retrieved).isEqualTo(DataType.DOUBLE);
        mathContext = MathContext.FLOAT;
        retrieved = KiePMMLUtil.getTargetDataType(miningFunction, mathContext);
        assertThat(retrieved).isEqualTo(DataType.FLOAT);
        miningFunction = MiningFunction.CLASSIFICATION;
        retrieved = KiePMMLUtil.getTargetDataType(miningFunction, mathContext);
        assertThat(retrieved).isEqualTo(DataType.STRING);
        miningFunction = MiningFunction.CLUSTERING;
        retrieved = KiePMMLUtil.getTargetDataType(miningFunction, mathContext);
        assertThat(retrieved).isEqualTo(DataType.STRING);
        List<MiningFunction> notMappedMiningFunctions = Arrays.asList(MiningFunction.ASSOCIATION_RULES,
                MiningFunction.MIXED,
                MiningFunction.SEQUENCES,
                MiningFunction.TIME_SERIES);

        notMappedMiningFunctions.forEach(minFun -> assertThat(KiePMMLUtil.getTargetDataType(minFun, MathContext.DOUBLE)).isNull());
    }