### Question:
AssigneeEditorWidget implements IsWidget,
                                             AssigneeEditorWidgetView.Presenter { @Override public void setValue(String value) { setValue(value, false); } @Inject  AssigneeEditorWidget(AssigneeEditorWidgetView view,
                                ManagedInstance<AssigneeListItem> listItems,
                                TranslationService translationService,
                                Event<NotificationEvent> notification); void init(AssigneeType type, int max); @Override String getValue(); @Override void setValue(String value); @Override void setValue(String newValue, boolean fireEvents); @Override Widget asWidget(); @Override void doSave(); void deserializeAssignees(String serializedValue); String serializeAssignees(List<Assignee> assigneeRows); @Override void addAssignee(); @Override boolean isDuplicateName(String name); void removeAssignee(AssigneeListItem listItem); @Override void fireEvent(GwtEvent<?> gwtEvent); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); @Override String getNameHeader(); @Override String getAddLabel(); @PreDestroy void destroy(); void setReadOnly(boolean readOnly);  }### Answer:
@Test public void testSetEmptyValue() { widget.setValue(""); verify(view).clearList(); verify(listItems).destroyAll(); verify(listItems, never()).get(); verify(view, never()).add(any()); }
@Test public void testSetValue() { String value = "a,b,c"; widget.setValue(value); verify(view).clearList(); verify(listItems).destroyAll(); verify(listItems, times(3)).get(); verify(view, times(3)).add(any()); widget.doSave(); String newValue = widget.getValue(); assertEquals(value, newValue); }