I18nConfigOptionsProvider implements ConfigOptionProvider { @Override public @Nullable Collection<ParameterOption> getParameterOptions(URI uri, String param, @Nullable String context, @Nullable Locale locale) { if ("system:i18n".equals(uri.toString())) { Locale translation = locale != null ? locale : Locale.getDefault(); return processParamType(param, locale, translation); } return null; }  @Override @Nullable Collection<ParameterOption> getParameterOptions(URI uri, String param, @Nullable String context,
            @Nullable Locale locale);  }
@Test public void testLanguage() { assertThat(provider.getParameterOptions(uriI18N, "language", null, Locale.US), hasItem(expectedLangEN)); assertThat(provider.getParameterOptions(uriI18N, "language", null, Locale.US), not(hasItem(empty))); assertThat(provider.getParameterOptions(uriI18N, "language", null, Locale.FRENCH), hasItem(expectedLangFR)); assertThat(provider.getParameterOptions(uriI18N, "language", null, Locale.FRENCH), not(hasItem(empty))); assertThat(provider.getParameterOptions(uriI18N, "language", null, null), not(IsEmptyCollection.empty())); }
@Test public void testRegion() { assertThat(provider.getParameterOptions(uriI18N, "region", null, Locale.US), hasItem(expectedCntryEN)); assertThat(provider.getParameterOptions(uriI18N, "region", null, Locale.US), not(hasItem(empty))); assertThat(provider.getParameterOptions(uriI18N, "region", null, Locale.FRENCH), anyOf(hasItem(expectedCntryFRJava8), hasItem(expectedCntryFRJava9))); assertThat(provider.getParameterOptions(uriI18N, "region", null, Locale.FRENCH), not(hasItem(empty))); assertThat(provider.getParameterOptions(uriI18N, "region", null, null), not(IsEmptyCollection.empty())); }
@Test public void testUnknownParameter() { assertThat(provider.getParameterOptions(uriI18N, "unknown", null, Locale.US), nullValue()); }