@Test
public void testGetParametersWhenInViewMode() {

	DDMFormField ddmFormField = new DDMFormField("field", "paragraph");
	LocalizedValue text = new LocalizedValue();
	text.addString(text.getDefaultLocale(), "<p>This is a paragraph</p>\n");
	ddmFormField.setProperty("text", text);
	DDMFormFieldRenderingContext ddmFormFieldRenderingContext =
		new DDMFormFieldRenderingContext();
	ddmFormFieldRenderingContext.setViewMode(true);
	Map<String, Object> parameters =
		_paragraphDDMFormFieldTemplateContextContributor.getParameters(
			ddmFormField, ddmFormFieldRenderingContext);
	SanitizedContent sanitizedContent = (SanitizedContent)parameters.get(
		"text");
	Assert.assertEquals(
		text.getString(text.getDefaultLocale()),
		sanitizedContent.getContent());
}