### Question:
QNameFieldRenderer extends FieldRenderer<QNameFieldDefinition, DefaultFormGroup> { @Override protected void setReadOnly(final boolean readOnly) { typePicker.setEnabled(!readOnly); } QNameFieldRenderer(); @Inject  QNameFieldRenderer(final DataTypePickerWidget typePicker); @Override void init(final FormRenderingContext renderingContext,
                     final QNameFieldDefinition field); @Override String getName();  }### Answer:
@Test public void testSetReadOnly() { renderer.setReadOnly(false); verify(typePicker).setEnabled(true); renderer.setReadOnly(true); verify(typePicker).setEnabled(false); }