assertEquals("Not blocked cause its a nullsender",response,HookReturnCode.DECLINED);
}
public void testInvalidSenderDomainReject() throws MailAddressException {
ValidSenderDomainHandler handler = new ValidSenderDomainHandler();
SMTPSession session = setupMockedSession(new MailAddress("invalid@invalid"));
handler.setDNSService(setupDNSServer());
int response = handler.doMail(session,(MailAddress) session.getState().get(SMTPSession.SENDER)).getResult();
assertEquals("Blocked cause we use reject action", response,HookReturnCode.DENY);
}