@Test
public void testExtractCarrier() throws Exception {

    ByteBuffer carrierNull = null;
    SofaTracerSpanContext extractContext = this.registryExtractorInjector.extract(carrierNull);
    assertTrue(extractContext.toString(),
        extractContext.getSpanId().equals(SofaTracer.ROOT_SPAN_ID));
    ByteBuffer carrier = ByteBuffer.allocate(4);
    SofaTracerSpanContext extractContextAllo = this.registryExtractorInjector.extract(carrier);
    assertEquals(extractContextAllo.toString(), SofaTracer.ROOT_SPAN_ID,
        extractContextAllo.getSpanId());
}