CtripPlatformEmailService implements EmailService { @Override public CheckEmailResponse checkEmailAddress(String address) { Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(address); boolean result = matcher.find(); if(result) { return new CheckEmailResponse(true); } else { return new CheckEmailResponse(false, "Emails should be ctrip/trip emails and separated by comma or semicolon"); } }  @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 testCheckEmailAddress() { EmailService.CheckEmailResponse response = emailService.checkEmailAddress("xpipe@trip.com"); EmailService.CheckEmailResponse response2 = emailService.checkEmailAddress("xpipe@Ctrip.com"); Assert.assertTrue(response.isOk()); Assert.assertTrue(response2.isOk()); }