@Test
    public void testCheckContext() throws ExecutionException, InterruptedException {

        RpcInternalContext.getContext().setAttachment("_testKey", "TransmittableThreadLocal-value-set-in-parent");

        ThreadLocal<String> threadLocalContext = new ThreadLocal<String>();
        threadLocalContext.set("ThreadLocal-value-set-in-parent");

        FutureTask<String[]> task1 = new FutureTask<String[]>(new Callable() {
            @Override
            public Object call() throws Exception {
                String[] result = new String[2];
                result[0] = threadLocalContext.get();
                result[1] = (String) RpcInternalContext.getContext().getAttachment("_testKey");
                return result;
            }
        });
        new Thread(task1).start();

        while (!task1.isDone()) {
            Assert.assertEquals(null, task1.get()[0]);
            Assert.assertEquals("TransmittableThreadLocal-value-set-in-parent", task1.get()[1]);
        }
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/api/src/test/java/com/alipay/sofa/rpc/context/RpcInternalContextTest.java