@Test
public void testRequiredInputWithTextField() {

	ExtendedObjectClassDefinition extendedObjectClassDefinition = mock(
		ExtendedObjectClassDefinition.class);
	ExtendedAttributeDefinition extendedAttributeDefinition = mock(
		ExtendedAttributeDefinition.class);
	whenGetAttributeDefinitions(
		extendedObjectClassDefinition,
		new ExtendedAttributeDefinition[] {extendedAttributeDefinition},
		ExtendedObjectClassDefinition.ALL);
	whenGetAttributeDefinitions(
		extendedObjectClassDefinition,
		new ExtendedAttributeDefinition[] {extendedAttributeDefinition},
		ExtendedObjectClassDefinition.OPTIONAL);
	whenGetAttributeDefinitions(
		extendedObjectClassDefinition, new ExtendedAttributeDefinition[0],
		ExtendedObjectClassDefinition.REQUIRED);
	whenGetCardinality(extendedAttributeDefinition, 0);
	whenGetID(extendedAttributeDefinition, "Text");
	whenGetRequiredInput(extendedAttributeDefinition, true);
	whenGetType(
		extendedAttributeDefinition, ExtendedAttributeDefinition.STRING);
	ConfigurationModel configurationModel = new ConfigurationModel(
		null, null, null, extendedObjectClassDefinition, false);
	ConfigurationModelToDDMFormConverter
		configurationModelToDDMFormConverter = spy(
			new ConfigurationModelToDDMFormConverter(
				configurationModel, _enLocale, new EmptyResourceBundle()));
	whenGetConfigurationDDMForm(configurationModelToDDMFormConverter, null);
	DDMForm ddmForm = configurationModelToDDMFormConverter.getDDMForm();
	Map<String, DDMFormField> ddmFormFieldsMap =
		ddmForm.getDDMFormFieldsMap(false);
	DDMFormField ddmFormField = ddmFormFieldsMap.get("Text");
	Assert.assertNotNull(ddmFormField);
	Assert.assertEquals(DDMFormFieldType.TEXT, ddmFormField.getType());
	Assert.assertEquals("string", ddmFormField.getDataType());
	Assert.assertFalse(ddmFormField.isRepeatable());
	Assert.assertTrue(ddmFormField.isRequired());
}