@Test
public void getKiePMMLModelFromPlugin() throws Exception {

    final PMML pmml = TestUtils.loadFromFile(SOURCE_1);
    assertNotNull(pmml);
    assertEquals(1, pmml.getModels().size());
    assertTrue(pmml.getModels().get(0) instanceof RegressionModel);
    final String packageName = "packagename";
    final KiePMMLRegressionModel retrieved = PROVIDER.getKiePMMLModelFromPlugin(
            packageName,
            pmml.getDataDictionary(),
            pmml.getTransformationDictionary(),
            (RegressionModel) pmml.getModels().get(0), RELEASE_ID);
    assertNotNull(retrieved);
    assertTrue(retrieved instanceof KiePMMLRegressionModelWithSources);
    KiePMMLRegressionModelWithSources retrievedWithSources = (KiePMMLRegressionModelWithSources) retrieved;
    final Map<String, String> sourcesMap = retrievedWithSources.getSourcesMap();
    assertNotNull(sourcesMap);
    assertFalse(sourcesMap.isEmpty());
    KieMemoryCompiler.compile(sourcesMap, Thread.currentThread().getContextClassLoader());
}