DefaultMessages extends AbstractMessages implements Messages { @Override public String getMessageTemplate(String key, Locale locale) { return getTemplateString(key, locale); } DefaultMessages(String baseName);  DefaultMessages(String baseName, Charset charset); String getBaseName(); Charset getCharset(); @Override String getMessage(String key, MessageParams params, Locale locale); @Override Iterable<String> keys(Locale locale); @Override Iterable<String> keys(); @Override Iterable<Entry<String, String>> entries(Locale locale); @Override String getMessageTemplate(String key, Locale locale); @Override String toString();  }
@Test public void should_access_values() throws Exception { DefaultMessages m = new DefaultMessages("restx.i18n.test"); assertThat(m.getMessageTemplate("key2", Locale.ENGLISH)).isEqualTo("Hello {{who}}!"); assertThat(m.getMessageTemplate("key2", Locale.FRENCH)).isEqualTo("Bonjour {{who}} !"); }