I am looking for a mail server layout that can be configured as a Mockito mock object. We currently use GreenMail as a mock mail server, but I would like to do something similar in my unit tests:
- If a message with an xyz object arrives, accept.
- if mail with object zz1 arrives, send a temporary refusal
- If a message is sent with the message fh2, send a rebound (unknown recipient).
- .....
As I see it, GreenMail is not capable of this. Does anyone know a library that can do something like this?
source
share