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

        String query = exchange.getIn().getHeader(CAMEL_SQL_QUERY, String.class);
        if (query != null) {
            span.setTag(TagConstants.DB_STATEMENT, query);
        }
    }
@Test
    public void testPre() {
        Endpoint endpoint = Mockito.mock(Endpoint.class);
        Exchange exchange = Mockito.mock(Exchange.class);
        Message message = Mockito.mock(Message.class);

        Mockito.when(endpoint.getEndpointUri()).thenReturn("test");
        Mockito.when(exchange.getIn()).thenReturn(message);
        Mockito.when(message.getHeader(SqlSpanDecorator.CAMEL_SQL_QUERY, String.class)).thenReturn(SQL_STATEMENT);

        SpanDecorator decorator = new SqlSpanDecorator();

        MockSpanAdapter span = new MockSpanAdapter();

        decorator.pre(span, exchange, endpoint);

        assertEquals("sql", span.tags().get(TagConstants.DB_SYSTEM));
        assertEquals(SQL_STATEMENT, span.tags().get(TagConstants.DB_STATEMENT));
    }