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