pt.endEvent("c2", "t1", "success");
Assert.assertEquals(2, pt.getEvents().size());
// verify contents of the ProcessTrace
List<ProcessTraceEvent> evts = pt.getEvents();
ProcessTraceEvent evt0 = (ProcessTraceEvent) evts.get(0);
Assert.assertEquals("c1", evt0.getComponentName());
Assert.assertEquals("t1", evt0.getType());
Assert.assertEquals("testing", evt0.getDescription());
Assert.assertEquals("success", evt0.getResultMessage());
List<ProcessTraceEvent> subEvts = evt0.getSubEvents();
ProcessTraceEvent subEvt0 = (ProcessTraceEvent) subEvts.get(0);
Assert.assertEquals("c1", subEvt0.getComponentName());
Assert.assertEquals("t2", subEvt0.getType());
Assert.assertEquals("testing", subEvt0.getDescription());
Assert.assertEquals("success", subEvt0.getResultMessage());
Assert.assertTrue(subEvt0.getSubEvents().isEmpty());
ProcessTraceEvent evt1 = (ProcessTraceEvent) evts.get(1);
Assert.assertEquals("c2", evt1.getComponentName());
Assert.assertEquals("t1", evt1.getType());
Assert.assertEquals("testing", evt1.getDescription());
Assert.assertEquals("success", evt1.getResultMessage());
Assert.assertEquals(3, evt1.getSubEvents().size());
}