CtripPlatformEmailService implements EmailService { @Override public void sendEmail(Email email) { try { SendEmailResponse response = catTransactionMonitor.logTransaction(TYPE, "send email", new Callable<SendEmailResponse>() { @Override public SendEmailResponse call() throws Exception { return client.sendEmail(createSendEmailRequest(email)); } }); if(response != null && response.getResultCode() == 1) { logger.debug("[sendEmail]Email send out successfully"); } else if(response != null){ logger.error("[sendEmail]Email service Result message: {}", response.getResultMsg()); throw new XpipeRuntimeException(response.getResultMsg()); } } catch (Exception e) { logger.error("[sendEmail]Email service Error\n", e); } }  @Override void sendEmail(Email email); @Override CheckEmailResponse checkEmailAddress(String address); @Override CommandFuture<EmailResponse> sendEmailAsync(Email email); @Override CommandFuture<EmailResponse> sendEmailAsync(Email email, Executor executor); @Override @SuppressWarnings("unchecked") boolean checkAsyncEmailResult(EmailResponse response); @Override int getOrder();  }
@Test public void sendEmail() throws IOException { emailService.sendEmail(generateEmail()); }