SelectDDMFormFieldTemplateContextContributor implements DDMFormFieldTemplateContextContributor { protected List<String> getValue(String valueString) { JSONArray jsonArray = null; try { jsonArray = jsonFactory.createJSONArray(valueString); } catch (JSONException jsonException) { if (_log.isDebugEnabled()) { _log.debug(jsonException, jsonException); } jsonArray = jsonFactory.createJSONArray(); } List<String> values = new ArrayList<>(jsonArray.length()); for (int i = 0; i < jsonArray.length(); i++) { values.add(String.valueOf(jsonArray.get(i))); } return values; }  @Override Map<String, Object> getParameters(
		DDMFormField ddmFormField,
		DDMFormFieldRenderingContext ddmFormFieldRenderingContext);  }
@Test public void testGetValue1() { List<String> values = _selectDDMFormFieldTemplateContextContributor.getValue( "[\"a\",\"b\"]"); Assert.assertTrue(values.toString(), values.contains("a")); Assert.assertTrue(values.toString(), values.contains("b")); }
@Test public void testGetValue2() { List<String> values = _selectDDMFormFieldTemplateContextContributor.getValue( "INVALID_JSON"); Assert.assertTrue(values.toString(), values.isEmpty()); }