### Question:
RolesEditorFieldRenderer extends FieldRenderer<RolesEditorFieldDefinition, DefaultFormGroup> implements RolesEditorWidgetView.Presenter { @Override public String serialize(List<KeyValueRow> rows) { return serializer.serialize(Optional.ofNullable(rows), KeyValueRow::getKey, KeyValueRow::getValue); } @Inject  RolesEditorFieldRenderer(RolesEditorWidgetView editor,
                                    CaseRoleSerializer serializer); @Override String getName(); @Override List<KeyValueRow> deserialize(String value); @Override String serialize(List<KeyValueRow> rows);  }### Answer:
@Test public void serialize() { final String serialized = tested.serialize(rows); verify(caseRoleSerializer).serialize(eq(Optional.ofNullable(rows)), any(), any()); assertThat(serialized).isEqualTo(SERIALIZED_ROLE); }