### Question:
ResourceBundle extends AbstractResourceLoader implements Plugin { public static String getMessage(String key) { Locale locale = currentThreadLocale(); if (locale == null) { locale = Locale.getDefault(); } return getMessage(key, locale); } ResourceBundle(); static Locale currentThreadLocale(); static void setThreadLocale(Locale locale); static void clearThreadLocale(); static String getMessage(String key); static String getMessage(String key, Locale locale); static String getMessage(String key, String language, String country); @Override void init(); @Override int order(); void load(String... locations); @Override void start(); @Override void stop();  }### Answer:
@Test public void getMessage() { Assert.assertEquals("key_zh_CN", ResourceBundle.getMessage("i18n.k1")); ResourceBundle.setThreadLocale(new Locale("en", "US")); Assert.assertEquals("key_en_US", ResourceBundle.getMessage("i18n.k1")); ResourceBundle.setThreadLocale(new Locale("en")); Assert.assertEquals("key", ResourceBundle.getMessage("i18n.k1")); }
@Test public void getMessage1() { Assert.assertEquals("key2_en_US", ResourceBundle.getMessage("i18n.k2", new Locale("en", "US"))); Assert.assertNull(ResourceBundle.getMessage("i18n.k2")); }
@Test public void getMessage2() { Assert.assertEquals("key2_en_US", ResourceBundle.getMessage("i18n.k2", "en", "US")); Assert.assertNull(ResourceBundle.getMessage("i18n.k2")); }