### Question:
NameFieldRenderer extends FieldRenderer<NameFieldDefinition, DefaultFormGroup> implements RequiresValueConverter { @Override protected FormGroup getFormGroup(final RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { final HTML html = new HTML(); formGroup.render(html, field); } else { final String inputId = generateUniqueId(); textBox.setName(fieldNS); textBox.setId(inputId); textBox.setEnabled(!field.getReadOnly()); registerFieldRendererPart(textBox); formGroup.render(inputId, textBox, field); } return formGroup; } @Inject  NameFieldRenderer(final TextBox textBox); @Override String getName(); @Override Converter getConverter();  }### Answer:
@Test public void testGetFormGroupWhenPrettyMode() { renderer.init(context, definition); renderer.getFormGroup(RenderMode.PRETTY_MODE); verify(formGroup).render(any(HTML.class), eq(definition)); }