Source:
public void testProcessSingleMultiConsumerControlFlow() { TestSourceInfoCache cache=new TestSourceInfoCache(); CommunicationDetailsDeriver deriver = new CommunicationDetailsDeriver(); deriver.setSourceInfoCache(cache); List<Trace> traces1 = new ArrayList<Trace>(); Trace trace1 = new Trace(); trace1.setStartTime(1000000); traces1.add(trace1); trace1.setBusinessTransaction(BTXN_NAME); trace1.setId("trace1"); trace1.setHostName("host1"); trace1.setHostAddress("addr1"); Consumer c1 = new Consumer(); c1.setUri("FirstURI"); c1.setBaseTime(0); CorrelationIdentifier cid1 = new CorrelationIdentifier(); cid1.setScope(Scope.ControlFlow); cid1.setValue("cid1"); c1.getCorrelationIds().add(cid1); trace1.getNodes().add(c1); Producer p1 = new Producer(); p1.setBaseTime(1000000); p1.setDuration(2000000000); p1.getDetails().put(Producer.DETAILS_PUBLISH, "true"); CorrelationIdentifier pid1 = new CorrelationIdentifier(); pid1.setScope(Scope.ControlFlow); pid1.setValue("pid1"); p1.getCorrelationIds().add(pid1); c1.getNodes().add(p1); List<Trace> traces2 = new ArrayList<Trace>(); Trace trace2 = new Trace(); trace2.setStartTime(2000000); traces2.add(trace2); trace2.setBusinessTransaction(BTXN_NAME); trace2.setId("trace2"); trace2.setHostName("host2"); trace2.setHostAddress("addr2"); Consumer c2 = new Consumer(); c2.setUri("SecondURI"); c2.setDuration(1200000000); c2.getDetails().put(Consumer.DETAILS_PUBLISH, "true"); c2.getProperties().add(new Property("prop1", "value1")); CorrelationIdentifier cid2 = new CorrelationIdentifier(); cid2.setScope(Scope.ControlFlow); cid2.setValue("pid1"); c2.getCorrelationIds().add(cid2); trace2.getNodes().add(c2); CommunicationDetails details = null; try { deriver.initialise(null, traces1); deriver.initialise(null, traces2); details = deriver.processOneToOne(null, trace2); } catch (Exception e) { fail("Failed to process: " + e); } assertNotNull(details); assertTrue(details.isMultiConsumer()); }

Target:
public void testProcessSingleMultiConsumerControlFlow() throws RetryAttemptException { TestSourceInfoCache cache=new TestSourceInfoCache(); CommunicationDetailsDeriver deriver = new CommunicationDetailsDeriver(); deriver.setSourceInfoCache(cache); List<Trace> traces1 = new ArrayList<Trace>(); Trace trace1 = new Trace(); trace1.setStartTime(1000000); traces1.add(trace1); trace1.setBusinessTransaction(BTXN_NAME); trace1.setId("trace1"); trace1.setHostName("host1"); trace1.setHostAddress("addr1"); Consumer c1 = new Consumer(); c1.setUri("FirstURI"); c1.setBaseTime(0); CorrelationIdentifier cid1 = new CorrelationIdentifier(); cid1.setScope(Scope.ControlFlow); cid1.setValue("cid1"); c1.getCorrelationIds().add(cid1); trace1.getNodes().add(c1); Producer p1 = new Producer(); p1.setBaseTime(1000000); p1.setDuration(2000000000); p1.getDetails().put(Producer.DETAILS_PUBLISH, "true"); CorrelationIdentifier pid1 = new CorrelationIdentifier(); pid1.setScope(Scope.ControlFlow); pid1.setValue("pid1"); p1.getCorrelationIds().add(pid1); c1.getNodes().add(p1); List<Trace> traces2 = new ArrayList<Trace>(); Trace trace2 = new Trace(); trace2.setStartTime(2000000); traces2.add(trace2); trace2.setBusinessTransaction(BTXN_NAME); trace2.setId("trace2"); trace2.setHostName("host2"); trace2.setHostAddress("addr2"); Consumer c2 = new Consumer(); c2.setUri("SecondURI"); c2.setDuration(1200000000); c2.getDetails().put(Consumer.DETAILS_PUBLISH, "true"); c2.getProperties().add(new Property("prop1", "value1")); CorrelationIdentifier cid2 = new CorrelationIdentifier(); cid2.setScope(Scope.ControlFlow); cid2.setValue("pid1"); c2.getCorrelationIds().add(cid2); trace2.getNodes().add(c2); deriver.initialise(null, traces1); deriver.initialise(null, traces2); CommunicationDetails details = deriver.processOneToOne(null, trace2); assertNotNull(details); assertTrue(details.isMultiConsumer()); }