TraceTokenManager { public static void clearRequestToken() { TokenState oldToken = TraceTokenManager.token.get(); token.remove(); if (oldToken != null) { currentThread().setName(oldToken.getOldThreadName()); } } private  TraceTokenManager(); static TraceTokenScope registerRequestToken(@Nullable String tokenId); static TraceTokenScope registerTraceToken(@Nullable TraceToken token); @Deprecated @Nullable static String getCurrentRequestToken(); @Nullable static TraceToken getCurrentTraceToken(); static String createAndRegisterNewRequestToken(String... properties); static void clearRequestToken(); static TraceTokenScope addTraceTokenProperties(String... properties);  }
@Test public void testClearRequestToken() { createAndRegisterNewRequestToken("somekey", "somevalue"); clearRequestToken(); assertNull(getCurrentRequestToken()); assertNull(getCurrentTraceToken()); assertEquals(currentThread().getName(), "testing thread name"); }