ConfigDescriptionRegistry { public @Nullable ConfigDescription getConfigDescription(URI uri, @Nullable Locale locale) { List<ConfigDescriptionParameter> parameters = new ArrayList<>(); List<ConfigDescriptionParameterGroup> parameterGroups = new ArrayList<>(); boolean found = false; Set<URI> aliases = getAliases(uri); for (URI alias : aliases) { logger.debug("No config description found for '{}', using alias '{}' instead", uri, alias); found |= fillFromProviders(alias, locale, parameters, parameterGroups); } found |= fillFromProviders(uri, locale, parameters, parameterGroups); if (found) { List<ConfigDescriptionParameter> parametersWithOptions = new ArrayList<>(parameters.size()); for (ConfigDescriptionParameter parameter : parameters) { parametersWithOptions.add(getConfigOptions(uri, aliases, parameter, locale)); } return ConfigDescriptionBuilder.create(uri).withParameters(parametersWithOptions) .withParameterGroups(parameterGroups).build(); } else { return null; } }  Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale locale); Collection<ConfigDescription> getConfigDescriptions(); @Nullable ConfigDescription getConfigDescription(URI uri, @Nullable Locale locale); @Nullable ConfigDescription getConfigDescription(URI uri);  }
@Test public void testGetConfigDescription() throws Exception { configDescriptionRegistry.addConfigDescriptionProvider(configDescriptionProviderMock); ConfigDescription configDescription = requireNonNull(configDescriptionRegistry.getConfigDescription(uriDummy)); assertThat(configDescription.getUID(), is(equalTo(uriDummy))); }