/**
* Test method for {@link com.google.gwt.i18n.rebind.LocaleUtils#getRuntimeLocales()}.
*/
public void testGetRuntimeLocales() {
LocaleUtils localeUtils = LocaleUtils.getInstance(logger, props, ctx);
GwtLocaleFactory factory = LocaleUtils.getLocaleFactory();
Set<GwtLocale> locales = localeUtils.getRuntimeLocales();
assertEquals(2, locales.size());
assertContains(locales, factory.fromString("es_AR"));
assertContains(locales, factory.fromString("es_CO"));
localeProp.setCurrentValue("es");
LocaleUtils localeUtils2 = LocaleUtils.getInstance(logger, props, ctx);
localeProp.setCurrentValue("es_419");
assertNotSame(localeUtils, localeUtils2);
// check that we don't pick up runtime locales that are under a more-specific compile locale
locales = localeUtils2.getRuntimeLocales();
assertEquals(2, locales.size());
assertContains(locales, factory.fromString("es_ES"));
assertContains(locales, factory.fromString("es_GB"));
}