@Test
public void getKiePMMLDroolsAST() {

    final DataDictionary dataDictionary = pmml.getDataDictionary();
    final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap = getFieldTypeMap(pmml.getDataDictionary(),
                                                                                       pmml.getTransformationDictionary(),
                                                                                       treeModel.getLocalTransformations());
    KiePMMLDroolsAST retrieved = KiePMMLTreeModelFactory.getKiePMMLDroolsAST(dataDictionary, treeModel, fieldTypeMap, Collections.emptyList());
    assertNotNull(retrieved);
    List<DataField> dataFields = dataDictionary.getDataFields();
    assertEquals(dataFields.size(), fieldTypeMap.size());
    dataFields.forEach(dataField -> assertTrue(fieldTypeMap.containsKey(dataField.getName().getValue())));
}