DefaultEmailService implements EmailService { @Override public void sendEmail(Email email) { logger.info("Sender: {}", email.getSender()); logger.info("Receivers: {}", email.getRecipients()); logger.info("CCers: {}", email.getCCers()); logger.info("BCCers: {}", email.getBCCers()); logger.info("Context:\n{}", email.getBodyContent()); }  @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 boolean checkAsyncEmailResult(EmailResponse response); @Override int getOrder();  }
@Test public void sendEmail() throws Exception { Email email = new Email(); email.addRecipient("test@gmail.com"); email.setSender("sender@gmail.com"); email.setBodyContent("Hello world!"); email.setSubject("Hello"); emailService.sendEmail(email); }