KiePMMLDescrTypesFactory { public void declareTypes(final List<KiePMMLDroolsType> types) { logger.trace("declareTypes {} ", types); types.forEach(this::declareType); } private  KiePMMLDescrTypesFactory(final PackageDescrBuilder builder); static KiePMMLDescrTypesFactory factory(final PackageDescrBuilder builder); void declareTypes(final List<KiePMMLDroolsType> types);  }
@Test public void declareTypes() { List<KiePMMLDroolsType> types = new ArrayList<>(); types.add(KiePMMLDescrTestUtils.getDroolsType()); types.add(KiePMMLDescrTestUtils.getDottedDroolsType()); assertTrue(builder.getDescr().getTypeDeclarations().isEmpty()); KiePMMLDescrTypesFactory.factory(builder).declareTypes(types); assertEquals(2, builder.getDescr().getTypeDeclarations().size()); IntStream.range(0, types.size()) .forEach(i -> commonVerifyTypeDeclarationDescr(Objects.requireNonNull(types.get(i)), builder.getDescr().getTypeDeclarations().get(i))); }