### Question:
CloseableThreadLocal implements Closeable { public T get() { WeakReference<T> weakRef = t.get(); if (weakRef == null) { T iv = initialValue(); if (iv != null) { set(iv); return iv; } else { return null; } } else { maybePurge(); return weakRef.get(); } }  static CloseableThreadLocal<T> withInitial(Supplier<T> initialValueSupplier); T get(); void set(T object); @Override void close();  }### Answer:
@Test void testInitValue() { InitValueThreadLocal tl = new InitValueThreadLocal(); String str = (String)tl.get(); assertEquals(TEST_VALUE, str); }
@Test void testDefaultValueWithoutSetting() throws Exception { CloseableThreadLocal<Object> ctl = new CloseableThreadLocal<>(); assertNull(ctl.get()); }