@SuppressWarnings("unchecked")
@Test
public void testValidate() throws ConversionException
{
Map validators = createStrictMock(Map.class);
Set keys = createStrictMock(Set.class);
Iterator iterator = createStrictMock(Iterator.class);
OrderedProperty op = createStrictMock(OrderedProperty.class);
MethodValidators methodValidators = createStrictMock(MethodValidators.class);
Converter converter = createStrictMock(Converter.class);
Date sqlDate = Date.valueOf("1999-12-12");
simpleForm.setDateValue("1999-12-12");
ValidationInfo vi = new ValidationInfo(validators, handler, new DefaultConversionHandler());
expect(validators.keySet()).andReturn(keys);
expect(keys.iterator()).andReturn(iterator);
expect(iterator.hasNext()).andReturn(true);
expect(iterator.next()).andReturn(op);
expect(validators.get(op)).andReturn(methodValidators);
expect(methodValidators.getRequiresConversion()).andReturn(true);
expect(methodValidators.getConverter()).andReturn(converter);
expect(op.getPropertyName()).andReturn("dateValue");
expect(converter.toTargetType("1999-12-12")).andReturn(sqlDate);
expect(methodValidators.getConverterType()).andReturn(sqlDate.getClass());