// Create the test circuit from the test configuration parameters.
CircuitFactory circuitFactory = getCircuitFactory();
Circuit testCircuit = circuitFactory.createCircuit(getConnection(), getTestProps());
// This test case assumes it is using a local circuit.
LocalCircuitImpl localCircuit = (LocalCircuitImpl) testCircuit;
Session producerSession = localCircuit.getLocalPublisherCircuitEnd().getSession();
MessageProducer producer = localCircuit.getLocalPublisherCircuitEnd().getProducer();
MessageConsumer consumer = localCircuit.getLocalReceiverCircuitEnd().getConsumer();
// Send some tests messages, with random TTLs, some shorter and some longer than the pause time.
for (int i = 0; i < 100; i++)
{
Message testMessage = TestUtils.createTestMessageOfSize(producerSession, 10);