LocalizableTextDDMFormFieldTemplateContextContributor implements DDMFormFieldTemplateContextContributor { protected String getPredefinedValue( DDMFormField ddmFormField, DDMFormFieldRenderingContext ddmFormFieldRenderingContext) { LocalizedValue localizedValue = ddmFormField.getPredefinedValue(); if (localizedValue == null) { return null; } return localizedValue.getString( ddmFormFieldRenderingContext.getLocale()); }  @Override Map<String, Object> getParameters(
		DDMFormField ddmFormField,
		DDMFormFieldRenderingContext ddmFormFieldRenderingContext);  }
@Test public void testGetPredefinedValue() { String expectedString = StringUtil.randomString(); LocalizedValue predefinedValue = new LocalizedValue(LocaleUtil.US); predefinedValue.addString(LocaleUtil.US, expectedString); _ddmFormField.setProperty("predefinedValue", predefinedValue); Map<String, Object> parameters = _getParameters(); String actualPredefinedValue = (String)parameters.get( "predefinedValue"); Assert.assertEquals(expectedString, actualPredefinedValue); }