Circumstances
The EmailServiceTest class sends real emails with a JavaMailer instance. Therefore, testing the sent Strings is impossible.
Recommended Solution
Mock the JavaMailer and return the String instead of delivering it to the SMTP server.
Alternatives
Keeping the test as "real" as possible and using it only if testing of email functionality is required. So the test class have to stay ignored by jUnit.
Adding a filter to the noreply gmail account and use it for fetching all mails. They should be grouped within a folder to make bulk deletion possible. (-> Better solution than mocking?)
Circumstances The EmailServiceTest class sends real emails with a JavaMailer instance. Therefore, testing the sent Strings is impossible.
Recommended Solution Mock the JavaMailer and return the String instead of delivering it to the SMTP server.
Alternatives