assertTrue(mockedSession.isRelayingAllowed());
}
public void testIPGetRemoved() {
long sleepTime = 100;
POP3BeforeSMTPHandler handler = new POP3BeforeSMTPHandler();
setupMockedSMTPSession();
POP3BeforeSMTPHelper.addIPAddress("192.168.200.1");
assertFalse(mockedSession.isRelayingAllowed());
try {
Thread.sleep(sleepTime);
POP3BeforeSMTPHelper.removeExpiredIP(10);
handler.onConnect(mockedSession);
assertFalse(mockedSession.isRelayingAllowed());
} catch (InterruptedException e) {
//ignore
}