Double applyMax(double predictionDouble) {
        return targetField.getMax() != null ? Math.min(targetField.getMax(), predictionDouble) : predictionDouble;
    }
@Test
    void applyMax() {
        TargetField targetField = new TargetField(Collections.emptyList(), null, "string", null, null, null, null,
                                                  null);
        KiePMMLTarget kiePMMLTarget = getBuilder(targetField).build();
        assertThat(kiePMMLTarget.applyMax(4.33)).isCloseTo(4.33, Offset.offset(0.0));
        targetField = new TargetField(Collections.emptyList(), null, "string", null, null, 4.34, null, null);
        kiePMMLTarget = getBuilder(targetField).build();
        assertThat(kiePMMLTarget.applyMax(4.33)).isCloseTo(4.33, Offset.offset(0.0));
        assertThat(kiePMMLTarget.applyMax(4.35)).isCloseTo(4.34, Offset.offset(0.0));
    }