{
IMarkupWriter writer = newWriter();
IRequestCycle cycle = newCycle();
JSONObject json = new JSONObject();
TranslatedField field = newMock(TranslatedField.class);
checkOrder(field, false);
Date maxDate = new Date(System.currentTimeMillis() + ONE_DAY);
DateTranslator translator = new DateTranslator();
expect(field.getTranslator()).andReturn(translator);
expect(field.getClientId()).andReturn("myfield").anyTimes();
expect(field.getDisplayName()).andReturn("My Field");
FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
Locale locale = Locale.ENGLISH;
expect(context.getLocale()).andReturn(locale).anyTimes();