@Test
public void testGetParameters2() throws Exception {

	DDMFormField ddmFormField = new DDMFormField("field", "select");
	ddmFormField.setProperty("dataSourceType", "manual");
	ddmFormField.setMultiple(true);
	DDMFormFieldRenderingContext ddmFormFieldRenderingContext =
		new DDMFormFieldRenderingContext();
	ddmFormFieldRenderingContext.setLocale(LocaleUtil.US);
	LocalizedValue predefinedValue = new LocalizedValue();
	predefinedValue.setDefaultLocale(LocaleUtil.US);
	predefinedValue.addString(LocaleUtil.US, "[\"value 2\",\"value 3\"]");
	ddmFormField.setPredefinedValue(predefinedValue);
	_setUpDDMFormFieldOptionsFactory(
		ddmFormField, ddmFormFieldRenderingContext);
	SelectDDMFormFieldTemplateContextContributor spy = _createSpy();
	Map<String, Object> parameters = spy.getParameters(
		ddmFormField, ddmFormFieldRenderingContext);
	Assert.assertTrue(parameters.containsKey("dataSourceType"));
	Assert.assertEquals("manual", parameters.get("dataSourceType"));
	Assert.assertTrue(parameters.containsKey("multiple"));
	Assert.assertEquals(true, parameters.get("multiple"));
	Assert.assertTrue(parameters.containsKey("options"));
	List<Object> options = (List<Object>)parameters.get("options");
	Assert.assertEquals(options.toString(), 3, options.size());
	Map<String, String> optionMap = (Map<String, String>)options.get(0);
	Assert.assertEquals("Label 1", optionMap.get("label"));
	Assert.assertEquals("value 1", optionMap.get("value"));
	optionMap = (Map<String, String>)options.get(1);
	Assert.assertEquals("Label 2", optionMap.get("label"));
	Assert.assertEquals("value 2", optionMap.get("value"));
	optionMap = (Map<String, String>)options.get(2);
	Assert.assertEquals("Label 3", optionMap.get("label"));
	Assert.assertEquals("value 3", optionMap.get("value"));
	List<String> predefinedValueParameter = (List<String>)parameters.get(
		"predefinedValue");
	Assert.assertEquals(
		predefinedValueParameter.toString(), 2,
		predefinedValueParameter.size());
	Assert.assertTrue(
		predefinedValueParameter.toString(),
		predefinedValueParameter.contains("value 2"));
	Assert.assertTrue(
		predefinedValueParameter.toString(),
		predefinedValueParameter.contains("value 3"));
}