}
@Test
@SpecAssertion(section = "4.3.1.1", id = "i")
public void testIfNoLocaleIsSpecifiedTheDefaultLocaleIsAssumed() {
MessageInterpolator interpolator = getDefaultMessageInterpolator();
ConstraintDescriptor<?> descriptor = getDescriptorFor( DummyEntity.class, "foo" );
String messageTemplate = ( String ) descriptor.getAttributes().get( "message" );
MessageInterpolator.Context context = new TestContext( descriptor );
String messageInterpolatedWithNoLocale = interpolator.interpolate( messageTemplate, context );
// TODO(nchalko) i18n
//GwtLocaleFactory localeFactory = GWT.create(GwtLocaleFactory.class);
GwtLocale defaultLocale = null; // localeFactory.getDefault();
String messageInterpolatedWithDefaultLocale = interpolator.interpolate(
messageTemplate, context,defaultLocale
);
assertEquals( messageInterpolatedWithNoLocale, messageInterpolatedWithDefaultLocale, "Wrong substitution" );
}