### Question:
RolesListItemWidgetViewImpl implements RolesListItemWidgetView,
                                                    IsElement { @PostConstruct public void init() { role.setRegExp(ALPHA_NUM_REGEXP, INVALID_CHARACTERS_MESSAGE, INVALID_CHARACTERS_MESSAGE); role.addChangeHandler((e) -> handleValueChanged()); cardinality.addChangeHandler((e) -> handleValueChanged()); cardinality.addFocusHandler((e) -> handleFocus()); deleteButton.setIcon(IconType.TRASH); deleteButton.addClickHandler((e) -> handleDeleteButton()); tableRow.hidden = false; } protected  RolesListItemWidgetViewImpl(); void setParentWidget(final RolesEditorWidgetView parentWidget); @PostConstruct void init(); @Override VariableType getVariableType(); @Override void setReadOnly(final boolean readOnly); @Override boolean isDuplicateName(final String name); void handleDeleteButton(); @Override void notifyModelChanged(); @Override void setValue(KeyValueRow value); @Override KeyValueRow getValue(); @Override KeyValueRow getModel(); @Override void setModel(KeyValueRow model); static final String INVALID_CHARACTERS_MESSAGE; }### Answer:
@Test public void init() { verify(role).setRegExp(eq(StringUtils.ALPHA_NUM_REGEXP), anyString(), anyString()); verify(role).addChangeHandler(valueChangeHandler.capture()); verify(cardinality).addChangeHandler(valueChangeHandler.capture()); verify(deleteButton).setIcon(IconType.TRASH); ChangeHandler handler = valueChangeHandler.getValue(); handler.onChange(null); verify(notification, never()).fire(any()); verify(tested).notifyModelChanged(); reset(tested); handler.onChange(null); verify(tested, never()).notifyModelChanged(); reset(tested); when(widget.isDuplicateName(ROLE_NAME)).thenReturn(true); handler.onChange(null); verify(notification).fire(any()); verify(tested, never()).notifyModelChanged(); }