public ResourceBundle getResourceBundle(String baseName, Locale locale) {
// check of ResourceBundleProvider is registered in mock OSGI context
ResourceBundle resourceBundle = null;
ServiceReference serviceReference = bundleContext.getServiceReference(ResourceBundleProvider.class.getName());
if (serviceReference != null) {
ResourceBundleProvider provider = (ResourceBundleProvider)bundleContext.getService(serviceReference);
resourceBundle = provider.getResourceBundle(baseName, locale);
}
// if no ResourceBundleProvider exists return empty bundle
if (resourceBundle == null) {
resourceBundle = EMPTY_RESOURCE_BUNDLE;
}