IRequestCycle cycle = newCycle();
FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
expect(context.getProfile()).andReturn(json);
context.addInitializationScript(field, "dojo.require(\"dojo.i18n.number\");");
trainGetLocale(context, Locale.US);
trainBuildMessage(context, null, ValidationStrings.INVALID_NUMBER, new String[] { "Number Field", "#,##" },
"invalid number message");