### Question:
ReassignmentsEditorWidget extends Composite implements HasValue<ReassignmentTypeListValue> { public void setReadOnly(final boolean readOnly) { reassignmentWidget.setReadOnly(readOnly); } ReassignmentsEditorWidget(); @PostConstruct void init(); @Override void setValue(ReassignmentTypeListValue value, boolean fireEvents); @Override ReassignmentTypeListValue getValue(); @Override void setValue(ReassignmentTypeListValue value); @Override HandlerRegistration addValueChangeHandler(ValueChangeHandler<ReassignmentTypeListValue> handler); void setReadOnly(final boolean readOnly);  }### Answer:
@Test public void testReadOnly() { setFieldValue(reassignmentWidgetViewImpl, "addButton", new HTMLButtonElement()); setFieldValue(reassignmentWidgetViewImpl, "okButton", new HTMLButtonElement()); setFieldValue(reassignmentWidget, "view", reassignmentWidgetViewImpl); setFieldValue(reassignmentsEditorWidget, "reassignmentWidget", reassignmentWidget); reassignmentsEditorWidget.setReadOnly(true); boolean readOnly = getFieldValue(ReassignmentWidgetViewImpl.class, reassignmentWidgetViewImpl, "readOnly"); HTMLButtonElement addButton = getFieldValue(ReassignmentWidgetViewImpl.class, reassignmentWidgetViewImpl, "addButton"); HTMLButtonElement okButton = getFieldValue(ReassignmentWidgetViewImpl.class, reassignmentWidgetViewImpl, "okButton"); Assert.assertTrue(readOnly); Assert.assertTrue(addButton.disabled); Assert.assertTrue(okButton.disabled); }