### Question:
ResourceBundleManager { public ResourceBundle mergeWithGlobal(ResourceBundle resourceBundle) { if (globalResourceBundle == null) { if (resourceBundle == null) { return EMPTY_RESOURCE_BUNDLE; } else { return new ResourceBundleWrapper(resourceBundle); } } else { if (resourceBundle == null) { return new ResourceBundleWrapper(globalResourceBundle); } else { return merge(resourceBundle, globalResourceBundle); } } } ResourceBundleManager(); static ResourceBundleManager getInstance(); void setGlobalResourceBundle(ResourceBundle resourceBundle); ResourceBundle getGlobalResourceBundle(); ResourceBundle mergeWithGlobal(ResourceBundle resourceBundle); ResourceBundle mergeListWithGlobal(List<ResourceBundle> bundles); static final ResourceBundle EMPTY_RESOURCE_BUNDLE; }### Answer:
@Test public void noGlobalDefined() { final ResourceBundle merged = manager.mergeWithGlobal(other); assertThat(merged.getString(KEY_COMMON)).isEqualTo(VALUE_1_OTHER); assertThat(merged.getString(KEY_OTHER_SPECIFIC)).isEqualTo(VALUE_2_OTHER); expectMissingResource(merged, KEY_GLOBAL_SPECIFIC); }
@Test public void bothBundlesAreNull() { final ResourceBundle merged = manager.mergeWithGlobal(null); assertThat(merged).isNotNull(); assertThat(merged.keySet()).isEmpty(); }