UTF8Control extends Control { public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException { String bundleName = toBundleName(baseName, locale); String resourceName = toResourceName(bundleName, "properties"); ResourceBundle bundle = null; InputStream stream = (reload) ? reload(loader.getResource(resourceName)) : loader .getResourceAsStream(resourceName); if (stream != null) { try { bundle = new PropertyResourceBundle(new InputStreamReader(stream, "UTF-8")); } finally { stream.close(); } } return bundle; }  ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload);  }
@Test public void newBundle() { UTF8Control control = new UTF8Control(); try { control.newBundle("", Locale.getDefault(), "", TestUTF8Control.class.getClassLoader(), true); } catch (Exception e) { Assert.fail(e.getMessage(), e); } }