Set<List<TestClientDetails>> failPairs = allPairs(optOuts, allClients);
for (List<TestClientDetails> failPair : failPairs)
{
// Create a distributed test circuit factory for the test.
CircuitFactory circuitFactory = getTestSequencer();
// Create an automatic failure test for the opted out test pair.
FrameworkBaseCase failTest = new OptOutTestCase("testOptOut");
circuitFactory.setSender(failPair.get(0));
circuitFactory.setReceiver(failPair.get(1));
failTest.setCircuitFactory(circuitFactory);
failTest.run(testResult);
}
// Loop over all combinations of clients, willing to run the test.
Set<List<TestClientDetails>> enlistedPairs = allPairs(enlists, enlists);
for (List<TestClientDetails> enlistedPair : enlistedPairs)
{
// Create a distributed test circuit factory for the test.
CircuitFactory circuitFactory = getTestSequencer();
// Set the sending and receiving client details on the test circuitFactory.
circuitFactory.setSender(enlistedPair.get(0));
circuitFactory.setReceiver(enlistedPair.get(1));
// Pass down the connection to hold the coordination conversation over.
circuitFactory.setConversationFactory(conversationFactory);
// Execute the test case.
coordTest.setCircuitFactory(circuitFactory);
coordTest.run(testResult);
}