@Test public void i18n() throws Exception { assertEquals("測試中", composer.i18n(Locale.TAIWAN, "unit-test")); assertEquals("testing", composer.i18n(Locale.ENGLISH, "unit-test")); assertEquals("testing", composer.i18n(Locale.FRENCH, "unit-test")); }
public String i18n(Locale locale, String key, Object... args) { return messageSource.getMessage(key, args, locale); }
MailComposer { public String i18n(Locale locale, String key, Object... args) { return messageSource.getMessage(key, args, locale); } }
MailComposer { public String i18n(Locale locale, String key, Object... args) { return messageSource.getMessage(key, args, locale); } MailComposer(); @VisibleForTesting  MailComposer(MessageSource messageSource,
      Configuration configuration,
      MailProperties mailProperties); }
MailComposer { public String i18n(Locale locale, String key, Object... args) { return messageSource.getMessage(key, args, locale); } MailComposer(); @VisibleForTesting  MailComposer(MessageSource messageSource,
      Configuration configuration,
      MailProperties mailProperties); Mail createMail(); String i18n(Locale locale, String key, Object... args); String compose(Locale locale, String templateFile, Map<String, Object> model); }
MailComposer { public String i18n(Locale locale, String key, Object... args) { return messageSource.getMessage(key, args, locale); } MailComposer(); @VisibleForTesting  MailComposer(MessageSource messageSource,
      Configuration configuration,
      MailProperties mailProperties); Mail createMail(); String i18n(Locale locale, String key, Object... args); String compose(Locale locale, String templateFile, Map<String, Object> model);  }