@Override
    public void pre(SpanAdapter span, Exchange exchange, Endpoint endpoint) {
        super.pre(span, exchange, endpoint);
        span.setTag(TagConstants.MESSAGE_BUS_DESTINATION, getDestination(exchange, endpoint));

        String messageId = getMessageId(exchange);
        if (messageId != null) {
            span.setTag(TagConstants.MESSAGE_ID, messageId);
        }
    }
@Test
    public void testPreMessageBusDestination() {
        Endpoint endpoint = Mockito.mock(Endpoint.class);

        Mockito.when(endpoint.getEndpointUri()).thenReturn("jms://MyQueue?hello=world");

        SpanDecorator decorator = new AbstractMessagingSpanDecorator() {
            @Override
            public String getComponent() {
                return null;
            }

            @Override
            public String getComponentClassName() {
                return null;
            }
        };

        MockSpanAdapter span = new MockSpanAdapter();

        decorator.pre(span, null, endpoint);

        assertEquals("MyQueue", span.tags().get(TagConstants.MESSAGE_BUS_DESTINATION));
    }