List<ExternalResourceDescriptor> externalResourceDescriptors =
(List<ExternalResourceDescriptor>) analyzer.locateExternalResourceName(trace);
assertEquals(2, externalResourceDescriptors.size());
ExternalResourceDescriptor descriptor = externalResourceDescriptors.get(0);
assertEquals(op2, descriptor.getFrame().getOperation());
assertEquals("JMS-Queue#test.queue", descriptor.getLabel());
assertEquals(ExternalResourceType.QUEUE.name(), descriptor.getType());
assertEquals("JMS", descriptor.getVendor());
assertEquals("127.0.0.2", descriptor.getHost());
assertEquals(1111, descriptor.getPort());
String expectedHash = MD5NameGenerator.getName("Queue#test.queue127.0.0.21111");
assertEquals("JMS:" + expectedHash, descriptor.getName());
assertEquals(Boolean.valueOf(isIncoming), Boolean.valueOf(descriptor.isIncoming()));
descriptor = externalResourceDescriptors.get(1);
assertEquals(op1, descriptor.getFrame().getOperation());
assertEquals("JMS-Queue#test.queue", descriptor.getLabel());
assertEquals(ExternalResourceType.QUEUE.name(), descriptor.getType());
assertEquals("JMS", descriptor.getVendor());
assertEquals(null, descriptor.getHost());
assertEquals(-1, descriptor.getPort());
expectedHash = MD5NameGenerator.getName("Queue#test.queuenull-1");
assertEquals("JMS:" + expectedHash, descriptor.getName());
assertEquals(Boolean.valueOf(isIncoming), Boolean.valueOf(descriptor.isIncoming()));
}