### Question:
MetaUtil { public static RequestHeader convertRequestToOldProtocolHeader(DefaultRequest request) { RequestHeader requestHeader = new RequestHeader(); requestHeader.setClientAppkey(request.getAppkey()); requestHeader.setClientIp(request.getClientIp()); TransportTraceInfo transportTraceInfo = request.getTransportTraceInfo(); if (transportTraceInfo != null) { requestHeader.setTraceId(transportTraceInfo.getTraceId()); requestHeader.setSpanId(transportTraceInfo.getSpanId()); requestHeader.setDebug(transportTraceInfo.isDebug()); } requestHeader.setGlobalContext(request.getGlobalContexts()); requestHeader.setLocalContext(request.getLocalContexts()); return requestHeader; }  static Header convertRequestToHeader(DefaultRequest request); static DefaultRequest convertHeaderToRequest(Header header); static DefaultResponse convertHeaderToResponse(Header header); static Header convertResponseToHeader(DefaultResponse response); static RequestHeader convertRequestToOldProtocolHeader(DefaultRequest request); static DefaultRequest convertOldProtocolHeaderToRequest(RequestHeader header, DefaultRequest request); static void recordTraceInfoInDecode(byte[] msgBuff, Object message); static void recordTraceInfoInEncode(byte[] msgBuff, Object message); static void wrapException(Exception exception, DefaultResponse response);  }### Answer:
@Test public void testRequestToOldProtocolHeader() { RequestHeader header = MetaUtil.convertRequestToOldProtocolHeader(request); Assert.assertEquals(header.getClientAppkey(), "com.sankuai.mock"); Assert.assertEquals(header.getTraceId(), "123"); }