bNetworks.add("127.0.0.1");
DNSService dns = setupMockedDNSServer();
MailAddress mailAddress = new MailAddress("test@" + INVALID_HOST);
SMTPSession session = setupMockedSMTPSession(mailAddress);
ValidRcptMX handler = new ValidRcptMX();
handler.setDNSService(dns);
handler.setBannedNetworks(bNetworks, dns);
int rCode = handler.doRcpt(session, null, mailAddress).getResult();
assertEquals("Reject", rCode, HookReturnCode.DENY);
}