### Question:
MailServiceImpl implements MailService { @Override public String getMailHtml(MailTemplateModel mailTemplateModel) { try { Configuration configuration = new Configuration(Configuration.getVersion()); configuration.setDefaultEncoding("utf-8"); Template template = freeMarkerConfigurer.getConfiguration().getTemplate("mailTemplate.ftl"); return FreeMarkerTemplateUtils.processTemplateIntoString(template, mailTemplateModel); } catch (Exception e) { e.printStackTrace(); log.error("模板静态化异常", e); return null; } }  @Async @Override void sendSimpleMail(MailTemplateModel model, String email); @Override String getMailHtml(MailTemplateModel mailTemplateModel);  }### Answer:
@Test public void getMailHtmlTest() { MailTemplateModel model = new MailTemplateModel(); model.setDomain("ffis.me"); model.setTime(new Date()); model.setStatus("Domain name is available 表示域名可以注册"); String result = mailService.getMailHtml(model); System.out.println(result); }