### Question:
DataTypeConstraintEnumerationItemView implements DataTypeConstraintEnumerationItem.View { @EventHandler("save-anchor") public void onSaveAnchorClick(final ClickEvent e) { presenter.save(typedValueSelector.getValue()); } @Inject  DataTypeConstraintEnumerationItemView(final @Named("span") HTMLElement valueText,
                                                 final HTMLDivElement valueInput,
                                                 final HTMLAnchorElement saveAnchor,
                                                 final HTMLAnchorElement removeAnchor,
                                                 final HTMLAnchorElement clearFieldAnchor,
                                                 final TranslationService translationService,
                                                 final TypedValueComponentSelector valueComponentSelector); @Override void init(final DataTypeConstraintEnumerationItem presenter); @Override void showValueText(); @Override void showValueInput(); @Override void focusValueInput(); @Override void showSaveButton(); @Override void hideSaveButton(); @Override void enableHighlight(); @Override void disableHighlight(); @EventHandler("value-text") void onValueTextClick(final ClickEvent e); @EventHandler("save-anchor") void onSaveAnchorClick(final ClickEvent e); @EventHandler("remove-anchor") void onRemoveAnchorClick(final ClickEvent e); @EventHandler("clear-field-anchor") void onClearFieldAnchorClick(final ClickEvent e); void onValueInputBlur(final BlurEvent blurEvent); @Override void setValue(final String value); @Override void setPlaceholder(final String placeholder); @Override void setComponentSelector(final String type); @Override void showClearButton(); @Override void hideDeleteButton(); @Override void hideClearButton(); @Override void showDeleteButton(); @Override int getOrder(); @Override void setOrder(final int order); static final String DATA_POSITION; }### Answer:
@Test public void testOnSaveAnchorClick() { final String value = "value"; typedValueSelector.setValue(value); when(typedValueSelector.getValue()).thenReturn(value); view.onSaveAnchorClick(mock(ClickEvent.class)); verify(presenter).save(value); }