@VisibleForTesting
    protected void parseRequestHeader(Map<String, String> headerMap, Object sofaRequest) {
        if (sofaRequest instanceof SofaRequest) {
            // 处理 tracer
            parseRequestHeader(RemotingConstants.RPC_TRACE_NAME, headerMap, (SofaRequest) sofaRequest);
            if (RpcInvokeContext.isBaggageEnable()) {
                parseRequestHeader(RemotingConstants.RPC_REQUEST_BAGGAGE, headerMap, (SofaRequest) sofaRequest);
            }
            Map<String, Object> requestProps = ((SofaRequest) sofaRequest).getRequestProps();
            if (requestProps == null) {
                for (Map.Entry<String, String> entry : headerMap.entrySet()) {
                    ((SofaRequest) sofaRequest).addRequestProp(entry.getKey(), entry.getValue());
                }
            } else {
                replaceWithHeaderMap(headerMap, requestProps);
            }
        }
    }
@Test
    public void testParseRequestHeader(){
        Map<String, String> headerMap = new HashMap<>();
        headerMap.put("testKey1","testValue1");
        headerMap.put("rpc_trace_context.sofaTraceId", "traceId");
        headerMap.put("rpc_trace_context.sofaRpcId", "rpcId");
        headerMap.put("rpc_req_baggage.testBaggageKey1", "testBaggageValue1");
        headerMap.put("rpc_req_baggage.testBaggageKey2", "testBaggageValue2");
        SofaRpcSerialization sofaRpcSerialization = new SofaRpcSerialization();
        SofaRequest sofaRequest = new SofaRequest();
        sofaRequest.addRequestProp("testKey1", "testValue11");
        sofaRequest.addRequestProp("testKey2", "testValue2");
        sofaRpcSerialization.parseRequestHeader(headerMap, sofaRequest);
        sofaRpcSerialization.parseRequestHeader(headerMap, sofaRequest);
        Assert.assertEquals("testValue1", sofaRequest.getRequestProp("testKey1"));
        Assert.assertEquals("testValue2", sofaRequest.getRequestProp("testKey2"));
        Object traceMap = sofaRequest.getRequestProp(RemotingConstants.RPC_TRACE_NAME);
        Assert.assertTrue(traceMap instanceof Map);
        Assert.assertEquals("traceId",((Map)traceMap).get("sofaTraceId"));
        Assert.assertEquals("rpcId",((Map)traceMap).get("sofaRpcId"));
        Object baggageMap = sofaRequest.getRequestProp(RemotingConstants.RPC_REQUEST_BAGGAGE);
        Assert.assertTrue(baggageMap instanceof Map);
        Assert.assertEquals("testBaggageValue1", ((Map) baggageMap).get("testBaggageKey1"));
        Assert.assertEquals("testBaggageValue2", ((Map) baggageMap).get("testBaggageKey2"));

    }