### Question:
MailHandler { public void sendVerifyEMail(EmailEvent event) { SimpleMailMessage helper = new SimpleMailMessage(); helper.setFrom("insomnia163@163.com"); helper.setTo(event.getToEmail()); helper.setSubject(event.getSubject()); helper.setText("验证码： " + mEmailService.generateVerifyCode(event.getToEmail())); mailSender.send(helper); }  @Bean Queue getQueue(); @RabbitHandler void process(@Payload String message); void sendVerifyEMail(EmailEvent event); static ObjectMapper mapper; }### Answer:
@Test public void sendVerifyEMail() { EmailEvent emailEvent = new EmailEvent(); emailEvent.setToEmail("1037322351@qq.com") .setSubject("this is subject") .setContent("this is content") .setType(23); mMailHandler.sendVerifyEMail(emailEvent); }