### Question:
UndefinedExpressionSelectorPopoverImpl extends AbstractPopoverImpl<UndefinedExpressionSelectorPopoverView, UndefinedExpressionGrid> implements UndefinedExpressionSelectorPopoverView.Presenter { @Override public void onExpressionEditorDefinitionSelected(final ExpressionEditorDefinition definition) { binding.ifPresent(b -> { b.onExpressionTypeChanged(definition.getType()); view.hide(); }); } UndefinedExpressionSelectorPopoverImpl(); @Inject  UndefinedExpressionSelectorPopoverImpl(final UndefinedExpressionSelectorPopoverView view,
                                                  final TranslationService translationService,
                                                  final @DMNEditor Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier); @Override void onExpressionEditorDefinitionSelected(final ExpressionEditorDefinition definition); @Override String getPopoverTitle();  }### Answer:
@Test public void testOnExpressionEditorDefinitionSelectedWhenBound() { popover.bind(undefinedExpressionGrid, 0, 0); popover.onExpressionEditorDefinitionSelected(literalExpressionEditorDefinition); verify(undefinedExpressionGrid).onExpressionTypeChanged(eq(ExpressionType.LITERAL_EXPRESSION)); verify(view).hide(); }
@Test public void testOnExpressionEditorDefinitionSelectedWhenNotBound() { popover.onExpressionEditorDefinitionSelected(literalExpressionEditorDefinition); verify(undefinedExpressionGrid, never()).onExpressionTypeChanged(any(ExpressionType.class)); verify(view, never()).hide(); }