### Question:
DMNAssetsDropdownItemsProvider implements KieAssetsDropdownItemsProvider { KieAssetsDropdownItem asKieAsset(final IncludedModel includedModel) { final String text = includedModel.getModelName(); final String subText = includedModel.getModelPackage(); final String value = getKieAssetValue(includedModel); final Map<String, String> metaData = buildMetaData(includedModel); return new KieAssetsDropdownItem(text, subText, value, metaData); } @Inject  DMNAssetsDropdownItemsProvider(final DMNIncludeModelsClient client,
                                          final IncludedModelsPageState pageState,
                                          final IncludedModelsIndex modelsIndex,
                                          final SessionManager sessionManager); @Override void getItems(final Consumer<List<KieAssetsDropdownItem>> assetListConsumer); static final String PATH_METADATA; static final String IMPORT_TYPE_METADATA; static final String DRG_ELEMENT_COUNT_METADATA; static final String ITEM_DEFINITION_COUNT_METADATA; static final String PMML_MODEL_COUNT_METADATA; }### Answer:
@Test public void testAsKieAssetForDMNIncludedModel() { final DMNIncludedModel model = makeDMNIncludedModel(1, 2, 3); final KieAssetsDropdownItem dropdownItem = itemsProvider.asKieAsset(model); assertEquals(model.getModelName(), dropdownItem.getText()); assertEquals(model.getModelPackage(), dropdownItem.getSubText()); assertEquals(model.getNamespace(), dropdownItem.getValue()); assertEquals(model.getPath(), dropdownItem.getMetaData().get(PATH_METADATA)); assertEquals(model.getImportType(), dropdownItem.getMetaData().get(IMPORT_TYPE_METADATA)); assertEquals(model.getDrgElementsCount().toString(), dropdownItem.getMetaData().get(DRG_ELEMENT_COUNT_METADATA)); assertEquals(model.getItemDefinitionsCount().toString(), dropdownItem.getMetaData().get(ITEM_DEFINITION_COUNT_METADATA)); }
@Test public void testAsKieAssetForPMMLIncludedModel() { final PMMLIncludedModel model = makePMMLIncludedModel(1, 2); final KieAssetsDropdownItem dropdownItem = itemsProvider.asKieAsset(model); assertEquals(model.getModelName(), dropdownItem.getText()); assertEquals(model.getModelPackage(), dropdownItem.getSubText()); assertEquals(model.getPath(), dropdownItem.getMetaData().get(PATH_METADATA)); assertEquals(model.getImportType(), dropdownItem.getMetaData().get(IMPORT_TYPE_METADATA)); assertEquals(model.getModelCount().toString(), dropdownItem.getMetaData().get(PMML_MODEL_COUNT_METADATA)); }