boolean done=rsps.waitFor(500);
assert done;
}
public void testIterator() throws Exception {
Responses rsps=new Responses(10, true);
for(int i=0; i < 5; i++)
rsps.addResponse(new PingData(addrs[i],true,names[i],phys_addrs[i]), false);
int count=0;
for(PingData data: rsps) {
if(data != null)
count++;
if(count == 2)
rsps.addResponse(new PingData(addrs[5],true,names[5],phys_addrs[5]), false);
}
assert count == 5;
}