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

        span.setTag(TagConstants.DB_SYSTEM, "sql");

        Object body = exchange.getIn().getBody();
        if (body instanceof String) {
            span.setTag(TagConstants.DB_STATEMENT, (String) body);
        }
    }
@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.getBody()).thenReturn(SQL_STATEMENT);

        SpanDecorator decorator = new JdbcSpanDecorator();

        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));
    }