LocalizationSetterImpl implements LocalizationSetter { public boolean isSupportedLocaleName(String localeName) { return supportedLocaleNames.contains(localeName.toLowerCase()); } LocalizationSetterImpl(Request request,

    PersistentLocale persistentLocale,

    ThreadLocale threadLocale,

    @Symbol(SymbolConstants.SUPPORTED_LOCALES)
    String localeNames); Locale toLocale(String localeName); boolean setLocaleFromLocaleName(String localeName); void setNonPersistentLocaleFromLocaleName(String localeName); List<Locale> getSupportedLocales(); boolean isSupportedLocaleName(String localeName); SelectModel getSupportedLocalesModel();  }
@Test public void is_supported_locale_name() { PersistentLocale pl = mockPersistentLocale(); ThreadLocale tl = mockThreadLocale(); Request request = mockRequest(); replay(); LocalizationSetterImpl setter = new LocalizationSetterImpl(request, pl, tl, "de, de_DE, de_CH,en"); assertTrue(setter.isSupportedLocaleName("de")); assertTrue(setter.isSupportedLocaleName("de_de")); assertTrue(setter.isSupportedLocaleName("de_de")); assertTrue(setter.isSupportedLocaleName("de_DE")); assertTrue(setter.isSupportedLocaleName("de_ch")); assertTrue(setter.isSupportedLocaleName("de_CH")); assertTrue(setter.isSupportedLocaleName("en")); verify(); }