### Question:
RolesEditorWidgetViewImpl extends Composite implements RolesEditorWidgetView,
                                                                    HasValue<String> { @Override public void setReadOnly(final boolean readOnly) { this.readOnly = readOnly; addButton.setEnabled(!readOnly); for (int i = 0; i < getRowsCount(); i++) { getWidget(i).setReadOnly(readOnly); } } RolesEditorWidgetViewImpl(); @Override String getValue(); @Override void setValue(final String value); @Override void setValue(final String value,
                         final boolean fireEvents); @Override void doSave(); @Override void notifyModelChanged(); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler); @Override void init(final Presenter presenter); @Override void setReadOnly(final boolean readOnly); @Override int getRowsCount(); @Override void setRows(final List<KeyValueRow> rows); @Override List<KeyValueRow> getRows(); @Override RolesListItemWidgetView getWidget(int index); @Override void remove(final KeyValueRow row); @Override boolean isDuplicateName(String name);  }### Answer:
@Test public void setReadOnly() { tested.setReadOnly(true); verify(addButton).setEnabled(false); verify(list).getComponent(0); verify(widget).setReadOnly(true); }