"utf-8");
Assert.assertEquals(expectedCaller.replaceAll("\r", ""), reportCaller.toString().replaceAll("\r", ""));
}
protected MessageTree generateMessageTree(int i) {
MessageTree tree = new DefaultMessageTree();
tree.setMessageId("" + i);
tree.setDomain(m_domain);
tree.setHostName("group001");
tree.setIpAddress("192.168.1.1");
DefaultTransaction t;
if (i % 2 == 0) {
t = new DefaultTransaction("PigeonCall", "Cat-Test-Call", null);
DefaultEvent event = new DefaultEvent("PigeonCall.server", "192.168.1.0:3000:class:method1");
event.setTimestamp(m_timestamp + 5 * 60 * 1000);
event.setStatus(Message.SUCCESS);
t.addChild(event);
DefaultEvent eventApp = new DefaultEvent("PigeonCall.app", "server");
eventApp.setTimestamp(m_timestamp + 5 * 60 * 1000 + 100);
eventApp.setStatus(Message.SUCCESS);
t.addChild(eventApp);
} else {
t = new DefaultTransaction("PigeonService", "Cat-Test-Service", null);
DefaultEvent event = new DefaultEvent("PigeonService.client", "192.168.1.2:3000:class:method2");
event.setTimestamp(m_timestamp + 5 * 60 * 1000);
event.setStatus(Message.SUCCESS);
t.addChild(event);
DefaultEvent eventApp = new DefaultEvent("PigeonService.app", "client");
eventApp.setTimestamp(m_timestamp + 5 * 60 * 1000 + 100);
eventApp.setStatus(Message.SUCCESS);
t.addChild(eventApp);
}
t.complete();
t.setDurationInMillis(i * 2);
t.setTimestamp(m_timestamp + 1000);
tree.setMessage(t);
return tree;
}