### Question:
MetaDataListItemWidgetViewImpl implements MetaDataListItemWidgetView { @Override public void setValue(final String value) { getModel().setValue(value); }  void setParentWidget(final MetaDataEditorWidgetView.Presenter parentWidget); @PostConstruct void init(); @Override MetaDataRow getModel(); @Override void setModel(final MetaDataRow model); @Override String getValue(); @Override void setValue(final String value); @Override void setReadOnly(final boolean readOnly); @EventHandler("deleteButton") void handleDeleteButton(final ClickEvent e); @Override void notifyModelChanged();  }### Answer:
@Test public void testSetValue() { doCallRealMethod().when(view).setValue(anyString()); doCallRealMethod().when(view).getValue(); view.setValue("Value"); when(view.getModel()).thenReturn(new MetaDataRow("myString", "Value")); assertEquals("Value", view.getValue()); }
@Test public void testAttributeChangeHandlerWhenDuplicate() { when(parent.isDuplicateAttribute(ATTRIBUTE_NEW_NAME)).thenReturn(true); prepareAttributeChange(ATTRIBUTE_NEW_NAME, MODEL_NEW_TO_STRING); verify(parent).isDuplicateAttribute(ATTRIBUTE_NEW_NAME); verify(parent).showErrorMessage(anyString()); verify(name).setValue(ATTRIBUTE_NAME); }