### Question:
GenericServiceTaskEditorFieldRenderer extends FieldRenderer<GenericServiceTaskEditorFieldDefinition, DefaultFormGroup> { @Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); formGroup.render(editorWidget, field); return formGroup; } @Inject  GenericServiceTaskEditorFieldRenderer(final GenericServiceTaskEditorWidget editor); @Override String getName();  }### Answer:
@Test public void getFormGroup() { renderer = spy(new GenericServiceTaskEditorFieldRenderer(widget)); when(formGroupsInstance.get()).thenReturn(defaultFormGroup); setFieldValue(renderer, "formGroupsInstance", formGroupsInstance); FormGroup formGroup = renderer.getFormGroup(RenderMode.EDIT_MODE); assertThat(formGroup).isInstanceOf(DefaultFormGroup.class); }