static void populateMissingSegmentModelName(final Model model, final String segmentId) {
        String modelName = String.format(SEGMENTMODELNAME_TEMPLATE,
                                         segmentId,
                                         model.getClass().getSimpleName());
        model.setModelName(modelName);
    }
@Test
    void populateMissingSegmentModelName() throws Exception {
        final InputStream inputStream = getFileInputStream(NO_MODELNAME_NO_SEGMENTID_SAMPLE_NAME);
        final PMML pmml = org.jpmml.model.PMMLUtil.unmarshal(inputStream);
        final Model retrieved = pmml.getModels().get(0);
        assertThat(retrieved).isInstanceOf(MiningModel.class);
        MiningModel miningModel = (MiningModel) retrieved;
        Model toPopulate = miningModel.getSegmentation().getSegments().get(0).getModel();
        assertThat(toPopulate.getModelName()).isNull();
        String segmentId = "SEG_ID";
        KiePMMLUtil.populateMissingSegmentModelName(toPopulate, segmentId);
        assertThat(toPopulate.getModelName()).isNotNull();
        String expected = String.format(SEGMENTMODELNAME_TEMPLATE,
                segmentId,
                toPopulate.getClass().getSimpleName());
        assertThat(toPopulate.getModelName()).isEqualTo(expected);
    }