@Test
public void addPMMLRuleMapperKiePMMLModelHasNestedModelsHasRule() {

    KiePMMLModelHasNestedModelsHasRule kiePmmlModel = new KiePMMLModelHasNestedModelsHasRule("TEST",
                                                                                             Collections.emptyList());
    assertTrue(kiePmmlModel.sourcesMap.isEmpty());
    final List<String> generatedRuleMappers = new ArrayList<>();
    PMMLCompilerService.addPMMLRuleMapper(kiePmmlModel, generatedRuleMappers, "source_path");
    assertTrue(kiePmmlModel.sourcesMap.isEmpty());
    assertEquals(kiePmmlModel.nestedModels.size(), generatedRuleMappers.size());
    generatedRuleMappers.forEach(ret -> assertEquals(kiePmmlModel.getKModulePackageName() + "." + KIE_PMML_RULE_MAPPER_CLASS_NAME, ret));
    kiePmmlModel.nestedModels.forEach(nestedModel -> {
        assertTrue(((HasSourcesMap) nestedModel).getSourcesMap().containsKey(nestedModel.getKModulePackageName() + "." +KIE_PMML_RULE_MAPPER_CLASS_NAME));
    });
}