KiePMMLDescrTypesFactory { protected void declareType(final KiePMMLDroolsType type) { logger.trace("declareType {} ", type); String generatedType = type.getName(); String fieldType = type.getType(); builder.newDeclare() .type() .name(generatedType) .newField("value").type(fieldType) .end() .end(); } private  KiePMMLDescrTypesFactory(final PackageDescrBuilder builder); static KiePMMLDescrTypesFactory factory(final PackageDescrBuilder builder); void declareTypes(final List<KiePMMLDroolsType> types);  }
@Test public void declareType() { KiePMMLDroolsType type = KiePMMLDescrTestUtils.getDroolsType(); KiePMMLDescrTypesFactory.factory(builder).declareType(type); assertEquals(1, builder.getDescr().getTypeDeclarations().size()); commonVerifyTypeDeclarationDescr(type, builder.getDescr().getTypeDeclarations().get(0)); }