@Test
public void testWhiteListed() throws MailAddressException {
DNSRBLHandler rbl = createHandler();
setRemoteIp("127.0.0.2");
setupMockedSMTPSession(new MailAddress("any@domain"));
rbl.setWhitelist(new String[] { "bl.spamcop.net." });
rbl.setGetDetail(true);
rbl.doRcpt(mockedSMTPSession, null, new MailAddress("test@localhost"));
assertNull(mockedSMTPSession.getAttachment(RBL_DETAIL_MAIL_ATTRIBUTE_NAME, State.Connection));
assertNull("Not blocked", mockedSMTPSession.getAttachment(RBL_BLOCKLISTED_MAIL_ATTRIBUTE_NAME, State.Connection));
}