### Question:
KindPopoverViewImpl extends AbstractPopoverViewImpl implements KindPopoverView { @Override public void setFunctionKinds(final FunctionDefinition.Kind[] kinds) { Arrays.stream(kinds) .forEach(definition -> definitionsContainer.appendChild(makeListSelectorItemView(definition).getElement())); } KindPopoverViewImpl(); @Inject  KindPopoverViewImpl(final UnorderedList definitionsContainer,
                               final ManagedInstance<ListSelectorTextItemView> listSelectorTextItemViews,
                               final Div popoverElement,
                               final Div popoverContentElement,
                               final JQueryProducer.JQuery<Popover> jQueryPopover); @Override void init(final KindPopoverView.Presenter presenter); @Override void setFunctionKinds(final FunctionDefinition.Kind[] kinds);  }### Answer:
@Test public void testSetFunctionKinds() { view.setFunctionKinds(FunctionDefinition.Kind.values()); verify(textItemView1).setText(FunctionDefinition.Kind.FEEL.name()); verify(textItemView2).setText(FunctionDefinition.Kind.JAVA.name()); verify(textItemView3).setText(FunctionDefinition.Kind.PMML.name()); verify(definitionsContainer).appendChild(textElement1); verify(definitionsContainer).appendChild(textElement2); verify(definitionsContainer).appendChild(textElement3); final ArgumentCaptor<Command> commandCaptor1 = ArgumentCaptor.forClass(Command.class); verify(textItemView1).addClickHandler(commandCaptor1.capture()); commandCaptor1.getValue().execute(); verify(presenter).onFunctionKindSelected(eq(FunctionDefinition.Kind.FEEL)); final ArgumentCaptor<Command> commandCaptor2 = ArgumentCaptor.forClass(Command.class); verify(textItemView2).addClickHandler(commandCaptor2.capture()); commandCaptor2.getValue().execute(); verify(presenter).onFunctionKindSelected(eq(FunctionDefinition.Kind.JAVA)); final ArgumentCaptor<Command> commandCaptor3 = ArgumentCaptor.forClass(Command.class); verify(textItemView3).addClickHandler(commandCaptor3.capture()); commandCaptor3.getValue().execute(); verify(presenter).onFunctionKindSelected(eq(FunctionDefinition.Kind.PMML)); }