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

        Message message = exchange.getMessage();
        if (message != null) {
            Integer responseCode = message.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class);
            if (responseCode != null) {
                span.setTag(TagConstants.HTTP_STATUS, responseCode);
            }
        }
    }
@Test
    public void testPostResponseCode() {
        Exchange exchange = Mockito.mock(Exchange.class);
        Message message = Mockito.mock(Message.class);

        Mockito.when(exchange.getMessage()).thenReturn(message);
        Mockito.when(message.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class)).thenReturn(200);

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

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

        MockSpanAdapter span = new MockSpanAdapter();

        decorator.post(span, exchange, null);

        assertEquals(200, span.tags().get(TagConstants.HTTP_STATUS));
    }