### Question:
UndefinedExpressionSelectorPopoverViewImpl extends AbstractPopoverViewImpl implements UndefinedExpressionSelectorPopoverView { @Override public void setExpressionEditorDefinitions(final List<ExpressionEditorDefinition> definitions) { definitions.forEach(definition -> definitionsContainer.appendChild(makeListSelectorItemView(definition).getElement())); } UndefinedExpressionSelectorPopoverViewImpl(); @Inject  UndefinedExpressionSelectorPopoverViewImpl(final UnorderedList definitionsContainer,
                                                      final ManagedInstance<ListSelectorTextItemView> listSelectorTextItemViews,
                                                      final Div popoverElement,
                                                      final Div popoverContentElement,
                                                      final JQueryProducer.JQuery<Popover> jQueryPopover); @Override void init(final Presenter presenter); @Override void setExpressionEditorDefinitions(final List<ExpressionEditorDefinition> definitions);  }### Answer:
@Test public void testSetExpressionEditorDefinitions() { view.setExpressionEditorDefinitions(Arrays.asList(expressionEditorDefinition1, expressionEditorDefinition2)); verify(textItemView1).setText(DEFINITION_NAME1); verify(textItemView2).setText(DEFINITION_NAME2); verify(itemsContainer).appendChild(textElement1); verify(itemsContainer).appendChild(textElement2); final ArgumentCaptor<Command> commandCaptor1 = ArgumentCaptor.forClass(Command.class); verify(textItemView1).addClickHandler(commandCaptor1.capture()); commandCaptor1.getValue().execute(); verify(presenter).onExpressionEditorDefinitionSelected(eq(expressionEditorDefinition1)); final ArgumentCaptor<Command> commandCaptor2 = ArgumentCaptor.forClass(Command.class); verify(textItemView2).addClickHandler(commandCaptor2.capture()); commandCaptor2.getValue().execute(); verify(presenter).onExpressionEditorDefinitionSelected(eq(expressionEditorDefinition2)); }