assertNotNull("Blocked",mockedSMTPSession.getConnectionState().get(RBL_BLOCKLISTED_MAIL_ATTRIBUTE_NAME));
}
// ip is allowed to relay
public void testRelayAllowed() throws ParseException {
DNSRBLHandler rbl = new DNSRBLHandler();
setRelayingAllowed(true);
setupMockedSMTPSession(new MailAddress("any@domain"));
rbl.setDNSService(mockedDnsServer);
rbl.setBlacklist(new String[] { "bl.spamcop.net." });
rbl.setGetDetail(true);
rbl.doRcpt(mockedSMTPSession, null, new MailAddress("test@localhost"));
assertNull("No details",mockedSMTPSession.getConnectionState().get(RBL_DETAIL_MAIL_ATTRIBUTE_NAME));
assertNull("Not blocked",mockedSMTPSession.getConnectionState().get(RBL_BLOCKLISTED_MAIL_ATTRIBUTE_NAME));
}