public static void carryWithRequest(RpcInvokeContext context, SofaRequest request) {
        if (context != null) {
            Map<String, String> requestBaggage = context.getAllRequestBaggage();
            if (CommonUtils.isNotEmpty(requestBaggage)) { // 需要透传
                HashMap<String, String> tmp = new HashMap<>(requestBaggage);
                request.addRequestProp(RemotingConstants.RPC_REQUEST_BAGGAGE, tmp);
            }
        }
    }
@Test
    public void testCarryWithRequest() {
        SofaRequest sofaRequest = new SofaRequest();
        RpcInvokeContext context = RpcInvokeContext.getContext();
        context.putRequestBaggage(KEY, VALUE);
        BaggageResolver.carryWithRequest(context, sofaRequest);
        Object baggage = sofaRequest.getRequestProp(RemotingConstants.RPC_REQUEST_BAGGAGE);
        assertNotNull(baggage);
        assertEquals(HashMap.class, baggage.getClass());
        assertEquals(VALUE, ((Map) baggage).get(KEY));
    }