### Question:
QNameFieldRenderer extends FieldRenderer<QNameFieldDefinition, DefaultFormGroup> { @Override public void init(final FormRenderingContext renderingContext, final QNameFieldDefinition field) { Object model = renderingContext.getModel(); if (Objects.isNull(model)) { model = renderingContext.getParentContext().getModel(); } if (model instanceof DMNModelInstrumentedBase) { typePicker.setDMNModel((DMNModelInstrumentedBase) model); } superInit(renderingContext, field); } QNameFieldRenderer(); @Inject  QNameFieldRenderer(final DataTypePickerWidget typePicker); @Override void init(final FormRenderingContext renderingContext,
                     final QNameFieldDefinition field); @Override String getName();  }### Answer:
@Test public void testInit() { renderer.init(context, definition); verify(typePicker).setDMNModel(eq(dmnModel)); verify(renderer).superInit(eq(context), eq(definition)); }
@Test public void testGetFormGroupWhenEditMode() { renderer.init(context, definition); assertFormGroup(RenderMode.EDIT_MODE, true); }
@Test public void testGetFormGroupWhenReadOnlyMode() { renderer.init(context, definition); assertFormGroup(RenderMode.READ_ONLY_MODE, false); }
@Test public void testGetFormGroupWhenPrettyMode() { renderer.init(context, definition); assertFormGroup(RenderMode.PRETTY_MODE, false); }