title: Testing Methods in JUnit Prevents Email Sending
body: <p>I'm developing in Java and using JUnit to test some of my methods. Some of my methods send emails. The emails are actually sent by a separate thread that is spawned. The problem is that whenever I test these methods everything goes fine except that the emails are not actually sent. I've followed the execution through the whole stack and every method related to sending the emails is being called and executed correctly. So I tested the methods outside of JUnit and the emails send fine.</p>