@Test
public void getKiePMMLModelWithKnowledgeBuilder() {

    KnowledgeBuilderImpl knowledgeBuilder = new KnowledgeBuilderImpl();
    KiePMMLDroolsModel retrieved = droolsModelProvider.getKiePMMLModel(pmml.getDataDictionary(),
                                                                       pmml.getTransformationDictionary(),
                                                                       scorecard,
                                                                       knowledgeBuilder);
    assertNotNull(retrieved);
    assertTrue(retrieved instanceof KiePMMLDroolsModelTest);
    KiePMMLDroolsModelTest retrievedTest = (KiePMMLDroolsModelTest) retrieved;
    assertEquals(pmml.getDataDictionary(), retrievedTest.dataDictionary);
    assertEquals(pmml.getTransformationDictionary(), retrievedTest.transformationDictionary);
    assertEquals(scorecard, retrievedTest.model);
    String expectedPackageName = getSanitizedPackageName(PACKAGE_NAME);
    assertEquals(expectedPackageName, retrievedTest.getKModulePackageName());
    assertEquals(PACKAGE_NAME, retrievedTest.getName());
    PackageDescr packageDescr = knowledgeBuilder.getPackageDescrs("defaultpkg").get(0);
    commonVerifyPackageDescr(packageDescr, null, expectedPackageName);
}