static void correctTargetFields(MiningField targetMiningField, Targets targets) {
        if (targets != null && !targets.getTargets().isEmpty()) {
            final List<Target> targetsFields = targets.getTargets();
            targetsFields.stream()
                    .filter(targetField -> targetField.getField() == null)
                    .forEach(targetField -> targetField.setField(targetMiningField.getName()));
        }
    }
@Test
    void correctTargetFields() {
        final MiningField miningField = new MiningField("FIELD_NAME");
        final Targets targets = new Targets();
        final Target namedTarget = new Target();
        String targetName = "TARGET_NAME";
        namedTarget.setField(targetName);
        final Target unnamedTarget = new Target();
        targets.addTargets(namedTarget, unnamedTarget);
        KiePMMLUtil.correctTargetFields(miningField, targets);
        assertThat(namedTarget.getField()).isEqualTo(targetName);
        assertThat(unnamedTarget.getField()).isEqualTo(miningField.getName());
    }