### Question:
BundleLoader { public ResourceBundle getBundle(Enum<?> messageKey, Locale locale) throws MissingResourceException, IllegalArgumentException { MessageBundle bundleAnnotation = asMessageBundle(messageKey); return ResourceBundle.getBundle(bundleAnnotation.baseName(), locale, getClassLoader()); }  ResourceBundle getBundle(Enum<?> messageKey, Locale locale); ResourceBundle getApplicationBundle(FacesContext facesContext, Enum<?> messageKey, Locale locale);  }### Answer:
@Test public void testGetMessageBundle() throws Exception { facesEnvironment.replay(); assertEquals("Hello", bundleLoader.getBundle(BundleLoaderCoreMessages.message, Locale.US).getString("message")); assertEquals("Zdravstvujte", bundleLoader.getBundle(BundleLoaderCoreMessages.message, new Locale("ru", "RU")) .getString("message")); try { bundleLoader.getBundle(BundleLoaderCoreMessages.message, new Locale("by", "BY")); fail(); } catch (MissingResourceException e) { } }