source: class SofaTracerRunnableTest {
  
       SofaTraceContext traceContext;
       SofaTracerSpan span;
  
      @Test
      public void sofaTracerRunnableSamples() throws InterruptedException {
  
target:         SofaTraceContext sofaTraceContext = SofaTraceContextHolder.getSofaTraceContext();
          SofaTracerSpan sofaTracerSpan = mock((SofaTracerSpan.class));
          sofaTraceContext.push(sofaTracerSpan);
          RunnableTread runnableTread = new RunnableTread();
          SofaTracerRunnable sofaTracerRunnable = new SofaTracerRunnable(runnableTread,
              sofaTraceContext);
          //run1
          sofaTracerRunnable.run();
          assertEquals(1, sofaTraceContext.getThreadLocalSpanSize());
          assertEquals(Thread.currentThread().getId(), runnableTread.getThreadId());
          assertEquals(Thread.currentThread().getName(), runnableTread.getThreadName());
          //run2
          Thread thread = new Thread(sofaTracerRunnable);
          thread.start();
          Thread.sleep(3 * 1000);
          assertEquals(1, sofaTraceContext.getThreadLocalSpanSize());
          assertEquals(2, runnableTread.atomicLong.get());
          assertNotEquals(Thread.currentThread().getId(), runnableTread.getThreadId());
          assertNotEquals(Thread.currentThread().getName(), runnableTread.getThreadName());
      }
  
  }