### Question:
ThriftLogContext { public static void setRequestHeader(RequestHeader header) { threadLocal.get().setHeader(header); } private  ThriftLogContext(); static void newExecution(); static long getTraceId(); static void setTraceId(long traceId); static long getSpanId(); static void setSpanId(long spanId); static OptionalLong getParentSpanId(); static void setParentSpanId(OptionalLong parentSpanId); static Optional<Boolean> isSampled(); static void setSampled(Optional<Boolean> sampled); static RequestHeader getRequestHeader(); static void setRequestHeader(RequestHeader header); static void setParentRequestHeader(RequestHeader header); static String generateId(); static Optional<BooleanSupplier> getSampledSupplier(); static void setSampledSupplier(Optional<BooleanSupplier> sampledSupplier); static void setDefaultReporter(ThriftRequestReporter defaultRequestReporter); static ThriftRequestReporter getDefaultClientReporter(); static void setDefaultClientReporter(ThriftRequestReporter defaultClientReporter); static ThriftRequestReporter getDefaultServerReporter(); static void setDefaultServerReporter(ThriftRequestReporter defaultServerReporter); static String getClientAddress(); static void setClientAddress(String clientAddress); static final String TRACE_ID; static final String SPAN_ID; static final String PARENT_SPAN_ID; static final String SAMPLED; static final String CLIENT_ADDRESS; }### Answer:
@Test(groups = "unit") public void setRequestHeader() throws Exception { RequestHeader requestHeader = new RequestHeader(); requestHeader.setTraceId(0xDEAD); requestHeader.setSpanId(0xDEAF); requestHeader.setSampled(true); ThriftLogContext.setRequestHeader(requestHeader); assertEquals(MDC.get(ThriftLogContext.TRACE_ID), "dead"); assertEquals(MDC.get(ThriftLogContext.SPAN_ID), "deaf"); assertEquals(MDC.get(ThriftLogContext.PARENT_SPAN_ID), null); assertEquals(MDC.get(ThriftLogContext.SAMPLED), "true"); }