### Question:
TranslationModuleOverrideUtil { public void addTranslationKeysForPlugin(final String pluginIdentifier, final Set<String> basenames) { for (String locale : translationService.getLocales().keySet()) { Map<String, String> translations = Maps.newHashMap(); for (Resource resource : getPropertiesResources(basenames, locale)) { translations.putAll(getTranslationsFromProperties(resource)); } customTranslationManagementService.addCustomTranslations(pluginIdentifier, locale, translations); } }  boolean shouldOverride(); void addTranslationKeysForPlugin(final String pluginIdentifier, final Set<String> basenames); void removeTranslationKeysForPlugin(final String pluginIdentifier);  }### Answer:
@Test public void shouldntAddTranslationKeysForPluginIfLocalesAreEmpty() throws Exception { String pluginIdentifier = "plugin"; locales = mockStringSet(new HashSet<String>()); given(translationService.getLocales()).willReturn(localesMap); given(localesMap.keySet()).willReturn(locales); translationModuleOverrideUtil.addTranslationKeysForPlugin(pluginIdentifier, basenames); }
@Ignore @Test public void shouldAddTranslationKeysForPlugin() throws Exception { String pluginIdentifier = "plugin"; String locale = "pl"; String basename = "basename"; String searchName = basename + "_" + locale + ".properties"; Object key = "key"; locales = mockStringSet(Sets.newHashSet(locale)); given(translationService.getLocales()).willReturn(localesMap); given(localesMap.keySet()).willReturn(locales); basenames = mockStringSet(Sets.newHashSet(basename)); given(applicationContext.getResource(searchName)).willReturn(resource); given(resource.getInputStream()).willReturn(inputStream); resources = mockResourcesList(Arrays.asList(resource)); properties.load(inputStream); keys = mockObjectSet(Sets.newHashSet(key)); given(properties.keySet()).willReturn(keys); translationModuleOverrideUtil.addTranslationKeysForPlugin(pluginIdentifier, basenames); }