KiePMMLDataDictionaryASTFactory { public KiePMMLDroolsType declareType(DataField dataField) { String generatedType = getSanitizedClassName(dataField.getName().getValue().toUpperCase()); String fieldName = dataField.getName().getValue(); String fieldType = dataField.getDataType().value(); fieldTypeMap.put(fieldName, new KiePMMLOriginalTypeGeneratedType(fieldType, generatedType)); return new KiePMMLDroolsType(generatedType, DATA_TYPE.byName(fieldType).getMappedClass().getSimpleName()); } private  KiePMMLDataDictionaryASTFactory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); static KiePMMLDataDictionaryASTFactory factory(final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap); List<KiePMMLDroolsType> declareTypes(final DataDictionary dataDictionary); KiePMMLDroolsType declareType(DataField dataField);  }
@Test public void declareType() { DataField dataField = getTypeDataField(); final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap = new HashMap<>(); KiePMMLDroolsType retrieved = KiePMMLDataDictionaryASTFactory.factory(fieldTypeMap).declareType(dataField); assertNotNull(retrieved); commonVerifyTypeDeclarationDescr(dataField, fieldTypeMap, retrieved); }