SelectDDMFormFieldTemplateContextContributor implements DDMFormFieldTemplateContextContributor { protected List<Object> getOptions( DDMFormFieldOptions ddmFormFieldOptions, Locale locale, DDMFormFieldRenderingContext ddmFormFieldRenderingContext) { List<Object> options = new ArrayList<>(); for (String optionValue : ddmFormFieldOptions.getOptionsValues()) { if (optionValue == null) { continue; } options.add( HashMapBuilder.put( "label", () -> { LocalizedValue localizedValue = ddmFormFieldOptions.getOptionLabels(optionValue); return localizedValue.getString(locale); } ).put( "value", optionValue ).build()); } return options; }  @Override Map<String, Object> getParameters(
		DDMFormField ddmFormField,
		DDMFormFieldRenderingContext ddmFormFieldRenderingContext);  }
@Test public void testGetOptions() { List<Object> expectedOptions = new ArrayList<>(); expectedOptions.add(_createOption("Label 1", "value 1")); expectedOptions.add(_createOption("Label 2", "value 2")); expectedOptions.add(_createOption("Label 3", "value 3")); DDMFormFieldOptions ddmFormFieldOptions = _createDDMFormFieldOptions(); List<Object> actualOptions = _getActualOptions( ddmFormFieldOptions, LocaleUtil.US); Assert.assertEquals(expectedOptions, actualOptions); }