### Question:
Localizer { public Message get(String key) { return get(key, null); } private  Localizer(String pkg, String f, Locale locale, ClassLoader loader); static Localizer forPackage(Class<?> cls); static Localizer forPackage(Class<?> cls, Locale locale); static void addProvider(ResourceBundleProvider provider); static boolean removeProvider(ResourceBundleProvider provider); Message get(String key); Message getFatal(String key); Message get(String key, Object sub); Message getFatal(String key, Object sub); Message get(String key, Object sub1, Object sub2); Message getFatal(String key, Object sub1, Object sub2); Message get(String key, Object sub1, Object sub2, Object sub3); Message get(String key, Object[] subs); Message getFatal(String key, Object[] subs);  }### Answer:
@Test public void testForClass() { assertEqualsMSg(Locale.getDefault().equals(Locale.GERMANY) ? "value1_de" : "value1", _locals.get("test.local1")); }
@Test public void testMessageFormat() { String suffix = Locale.getDefault().equals(Locale.GERMANY) ? "_de" : ""; assertEqualsMSg("value2" + suffix + " x sep y", _locals.get("test.local2", new String[]{ "x", "y" })); assertEqualsMSg("value2" + suffix + " x sep {1}", _locals.get("test.local2", "x")); }