### Question:
CollapsedPaletteDefinitionBuilder extends AbstractPaletteDefinitionBuilder<CollapsedPaletteDefinitionBuilder> { @Override protected DefaultPaletteItem createItem(final Object definition, final String categoryId, final Metadata metadata, final Function<String, DefaultPaletteItem> itemSupplier) { final DefinitionAdapter<Object> definitionAdapter = getDefinitionManager().adapters().forDefinition(); final String id = definitionAdapter.getId(definition).value(); final String title = definitionAdapter.getTitle(definition); return new CollapsedItemBuilder() .setItemId(id) .setDefinitionId(id) .setTooltip(title) .build(); } @Inject  CollapsedPaletteDefinitionBuilder(final DefinitionUtils definitionUtils,
                                             final DomainProfileManager profileManager,
                                             final DefinitionsCacheRegistry definitionsRegistry,
                                             final StunnerTranslationService translationService);   }### Answer:
@Test public void testCreateItem() { DefaultPaletteItem item = tested.createItem(definition1, DEF1_CATEGORY, metadata, itemSupplier); assertNotNull(item); assertEquals(DEF1_ID, item.getId()); assertEquals(DEF1_ID, item.getDefinitionId()); assertEquals(DEF1_TITLE, item.getTitle()); assertEquals(DEF1_TITLE, item.getTooltip()); assertEquals(DEF1_TITLE, item.getDescription()); assertEquals(DefaultPaletteDefinitionBuilders.CollapsedItemBuilder.ICON_SIZE, item.getIconSize()); }