CentralizedThreadLocal extends ThreadLocal<T> { @Override protected T initialValue() { return _supplier.get(); } CentralizedThreadLocal(boolean shortLived);  CentralizedThreadLocal(String name);  CentralizedThreadLocal(String name, Supplier<T> supplier);  CentralizedThreadLocal(
		String name, Supplier<T> supplier, boolean shortLived);  CentralizedThreadLocal(
		String name, Supplier<T> supplier, Function<T, T> copyFunction,
		boolean shortLived); static void clearLongLivedThreadLocals(); static void clearShortLivedThreadLocals(); static Map<CentralizedThreadLocal<?>, Object> getLongLivedThreadLocals(); static Map<CentralizedThreadLocal<?>, Object> getShortLivedThreadLocals(); static void setThreadLocals(
		Map<CentralizedThreadLocal<?>, Object> longLivedCentralizedThreadLocals,
		Map<CentralizedThreadLocal<?>, Object>
			shortLivedCentralizedThreadLocals); @Override boolean equals(Object object); @Override T get(); @Override int hashCode(); @Override void remove(); @Override void set(T value); SafeClosable setWithSafeClosable(T value); @Override String toString();  }
@Test public void testInitialValue() { Object object = new Object(); CentralizedThreadLocal<?> centralizedThreadLocal = new CentralizedThreadLocal<Object>(false) { @Override protected Object initialValue() { return object; } }; Assert.assertSame(object, centralizedThreadLocal.get()); centralizedThreadLocal.remove(); centralizedThreadLocal = new CentralizedThreadLocal<>( null, () -> object); Assert.assertSame(object, centralizedThreadLocal.get()); centralizedThreadLocal.remove(); centralizedThreadLocal = new CentralizedThreadLocal<>(null, null); Assert.assertNull(centralizedThreadLocal.get()); centralizedThreadLocal.remove(); }