Utf8ResourceBundle extends ResourceBundle { public Utf8ResourceBundle(final String baseName) { this.bundle = getBundle(baseName); } Utf8ResourceBundle(final String baseName); @Override Enumeration<String> getKeys();  }
@Test public void testUtf8ResourceBundle() { ResourceBundle bundle = new Utf8ResourceBundle("messageTest"); assertNotNull(bundle); Enumeration<String> keys = bundle.getKeys(); assertNotNull(keys); String key = keys.nextElement(); assertEquals(key, "backend.settings.server.name.error"); String value = bundle.getString(key); assertNotNull(value); assertEquals(value, "Server name is mandatory"); }