public void testMaxWaitIntervalConfigurationParameter() throws Exception {
  System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER,"100");
  System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS,"true");
  System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS,"11");
  stunStack.addRequestListener(serverAddress,requestCollector);
  stunStack.sendRequest(bindingRequest,serverAddress,clientAddress,responseCollector);
  Thread.sleep(1200);
  Vector<StunMessageEvent> reqs=requestCollector.getRequestsForTransaction(bindingRequest.getTransactionID());
  assertEquals("Not all retransmissions were made for the expected period " + "of time",12,reqs.size());
  Thread.sleep(1800);
  reqs=requestCollector.getRequestsForTransaction(bindingRequest.getTransactionID());
  assertEquals("A retransmissions of the request was sent, while not " + "supposed to",12,reqs.size());
}

public void testMaxWaitIntervalConfigurationParameter ( ) throws Exception { System . setProperty ( StackProperties . MAX_CTRAN_RETRANS_TIMER , "100" ) ; System . setProperty ( StackProperties . PROPAGATE_RECEIVED_RETRANSMISSIONS , "true" ) ; System . setProperty ( StackProperties . MAX_CTRAN_RETRANSMISSIONS , "11" ) ; stunStack . addRequestListener ( serverAddress , requestCollector ) ; stunStack . sendRequest ( bindingRequest , serverAddress , clientAddress , responseCollector ) ; Thread . sleep ( 1200 ) ; Vector < StunMessageEvent > reqs = requestCollector . getRequestsForTransaction ( bindingRequest . getTransactionID ( ) ) ; assertEquals ( "Not all retransmissions were made for the expected period " + "of time" , 12 , reqs . size ( ) ) ; Thread . sleep ( 1800 ) ; reqs = requestCollector . getRequestsForTransaction ( bindingRequest . getTransactionID ( ) ) ; assertEquals ( "A retransmissions of the request was sent, while not " + "supposed to" , 12 , reqs . size ( ) ) ; }
tests whether the properties for configuring the maximum transaction wait interval is working properly .
