ConfigStatusService implements ConfigStatusCallback { public ConfigStatusInfo getConfigStatus(String entityId, final Locale locale) { if (entityId == null || entityId.equals("")) { throw new IllegalArgumentException("EntityId must not be null or empty"); } final Locale loc = locale != null ? locale : localeProvider.getLocale(); for (ConfigStatusProvider configStatusProvider : configStatusProviders) { if (configStatusProvider.supportsEntity(entityId)) { return getConfigStatus(configStatusProvider, entityId, loc); } } logger.debug("There is no config status provider for entity {} available.", entityId); return null; }  ConfigStatusInfo getConfigStatus(String entityId, final Locale locale); @Override void configUpdated(final ConfigStatusSource configStatusSource);  }
@Test public void assertThatNullIsReturnedForEntityWithoutRegisteredValidator() { ConfigStatusInfo info = configStatusService.getConfigStatus("unknown", null); assertThat("Config status info is null.", info, is((ConfigStatusInfo) null)); }