protected String getHttpURL(Exchange exchange, Endpoint endpoint) {
        Object url = exchange.getIn().getHeader(Exchange.HTTP_URL);
        if (url instanceof String) {
            return (String) url;
        } else {
            Object uri = exchange.getIn().getHeader(Exchange.HTTP_URI);
            if (uri instanceof String) {
                return (String) uri;
            } else {
                // Try to obtain from endpoint
                int index = endpoint.getEndpointUri().lastIndexOf("http:");
                if (index != -1) {
                    return endpoint.getEndpointUri().substring(index);
                }
            }
        }
        return null;
    }
@Test
    public void testGetHttpURLFromEndpointUriWithAdditionalScheme() {
        Endpoint endpoint = Mockito.mock(Endpoint.class);
        Exchange exchange = Mockito.mock(Exchange.class);
        Message message = Mockito.mock(Message.class);

        Mockito.when(endpoint.getEndpointUri()).thenReturn("netty-http:" + TEST_URI);
        Mockito.when(exchange.getIn()).thenReturn(message);

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

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

        assertEquals(TEST_URI, decorator.getHttpURL(exchange, endpoint));
    }