title: How to mock javax.mail.Transport.send() method without actually sending email?
body: <p>Code for sending email: </p>
  
  <pre><code>    Properties properties = new Properties();
      properties.setProperty("mail.smtp.host", host);
      Session session = Session.getInstance(properties);
      MimeMessage message = new MimeMessage(session);
      message.setFrom(new InternetAddress(from));
  
      message.setRecipient(RecipientType.TO, new InternetAddress(to));
      message.setSubject(subject);
      message.setText(content);
      session.setDebug(true);
  
      Transport.send(message);
  </code></pre>
  
  <p>I would like to test whether I am sending email correctly in mock way.
  Please help!</p>