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

        String httpUrl = getHttpURL(exchange, endpoint);
        if (httpUrl != null) {
            span.setTag(TagConstants.HTTP_URL, httpUrl);
        }
        span.setTag(TagConstants.HTTP_METHOD, getHttpMethod(exchange, endpoint));
    }
@Test
    public void testPreUri() {
        Endpoint endpoint = Mockito.mock(Endpoint.class);
        Exchange exchange = Mockito.mock(Exchange.class);
        Message message = Mockito.mock(Message.class);

        Mockito.when(endpoint.getEndpointUri()).thenReturn(TEST_URI);
        Mockito.when(exchange.getIn()).thenReturn(message);
        Mockito.when(message.getHeader(Exchange.HTTP_URI, String.class)).thenReturn(TEST_URI);

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

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

        MockSpanAdapter span = new MockSpanAdapter();

        decorator.pre(span, exchange, endpoint);

        assertEquals(TEST_URI, span.tags().get(TagConstants.HTTP_URL));
        assertTrue(span.tags().containsKey(TagConstants.HTTP_METHOD));
    }