SettingsFacade { public String getProperty(String key) { String result = null; String filename = findFilename(key); if (filename != null) { result = getProperty(key, filename); } return result; }  String getBundleSymbolicName(); String getBundleVersion(); @Autowired void setBundleContext(BundleContext bundleContext); @PostConstruct void afterPropertiesSet(); void setConfigFiles(List<Resource> resources); void setRawConfigFiles(List<Resource> resources); String getProperty(String key); String getProperty(String key, String filename); Properties getProperties(String filename); void setProperty(String key, String value); void saveConfigProperties(String filename, Properties properties); void saveRawConfig(String filename, Resource resource); void saveRawConfig(String filename, String jsonText); InputStream getRawConfig(String filename); Properties asProperties(); void unregisterProperties(String symbolicName); MotechSettings getPlatformSettings(); void savePlatformSettings(MotechSettings settings); boolean areConfigurationSettingsRegistered();  }
@Test public void testSetConfig() throws IOException { when(configurationService.getBundleProperties(eq(BUNDLE_NAME), eq(FILENAME), any(Properties.class))).thenReturn(null); when(props.getProperty(LANGUAGE_PROP)).thenReturn(LANGUAGE_VALUE); when(props.containsKey(LANGUAGE_PROP)).thenReturn(true); setUpConfig(); ArgumentCaptor<Properties> argument = ArgumentCaptor.forClass(Properties.class); verify(configurationService).addOrUpdateProperties(eq(BUNDLE_NAME), eq(BUNDLE_VERSION), eq(FILENAME), argument.capture(), any(Properties.class)); assertEquals(LANGUAGE_VALUE, argument.getValue().getProperty(LANGUAGE_PROP)); }