@Test
public void getKiePMMLModelFromPluginWithKnowledgeBuilder() {

    KnowledgeBuilderImpl knowledgeBuilder = new KnowledgeBuilderImpl();
    KiePMMLDroolsModel retrieved = droolsModelProvider.getKiePMMLModelFromPlugin(PACKAGE_NAME,
                                                                                 pmml.getDataDictionary(),
                                                                                 pmml.getTransformationDictionary(),
                                                                                 scorecard,
                                                                                 knowledgeBuilder);
    assertNotNull(retrieved);
    assertTrue(retrieved instanceof KiePMMLDroolsModelWithSources);
    KiePMMLDroolsModelWithSources retrievedSources = (KiePMMLDroolsModelWithSources) retrieved;
    assertEquals(SOURCE_MAP, retrievedSources.getSourcesMap());
    assertEquals(PACKAGE_NAME, retrievedSources.getKModulePackageName());
    assertEquals(scorecard.getModelName(), retrievedSources.getName());
    PackageDescr packageDescr = knowledgeBuilder.getPackageDescrs("defaultpkg").get(0);
    commonVerifyPackageDescr(packageDescr, null, PACKAGE_NAME);
}