analyzer.setIpConvertManager(new IpConvertManager());
analyzer.setCrossAppSwitch(new CrossAppSwitch().setTurnOn(true));
DefaultTransaction t = new DefaultTransaction("Service", "method1", null);
MessageTree tree = buildMockMessageTree();
CrossInfo info = analyzer.parseCorssTransaction(t, tree);
Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
Assert.assertEquals(info.getRemoteAddress(), "192.168.7.70");
Message message = new DefaultEvent("PigeonService.client", "192.168.7.71", null);
Message messageApp = new DefaultEvent("PigeonService.app", "myDomain", null);
t.addChild(message);
t.addChild(messageApp);
info = analyzer.parseCorssTransaction(t, tree);
Assert.assertEquals(info.getLocalAddress(), "192.168.0.1");
Assert.assertEquals(info.getRemoteAddress(), "192.168.7.71");
Assert.assertEquals(info.getDetailType(), "PigeonService");
Assert.assertEquals(info.getRemoteRole(), "Pigeon.Client");
Assert.assertEquals(info.getApp(), "myDomain");
}