assertTrue(theListenResult.getDuration() > 400); //could be get a little bit lesser than the specified min. waiting time (sleep) caused by accuracies of the OS and JDK implementations.
}
@Test
public void testListen_Min_Waiting_Interrupted() throws Exception {
final Domain theDomain = DomainFactory.getDomain("test_domain");
final UserInfo theUserInfo = new UserInfo("test_user");
ConnectionStrategyServerConnector theLongPollingListener = new LongPollingServerConnector(createConfiguration(1000, 2000, 90000));
ListenRunnable theListenRunnable = new ListenRunnable(theLongPollingListener, theUserInfo);
Thread theListenThread = new Thread(theListenRunnable);