Russ,
Sorry for the late response. One pattern that has worked for us is to name the agents in a test case _base_d on a counter:
| Code: : |
SIPAgent caller = createAgent("caller-"+currentCount);
SIPAgent callee = createAgent("callee-"+currentCount);
|
The counter can be an AtomicInteger static field in the class containing the test case, which gets incremented in the constructor of that class:
| Code: : |
static AtomicInteger counter = new AtomicInteger(0);
int currentCount;
...
public MyTestCaseClass throws Exception {
...
currentCount = counter.getAndIncrement();
...
}
...
|
Would this meet your needs?