InternalThreadLocal { @SuppressWarnings("unchecked") public final void remove() { remove(InternalThreadLocalMap.getIfSet()); } InternalThreadLocal(); @SuppressWarnings("unchecked") static void removeAll(); static int size(); static void destroy(); @SuppressWarnings("unchecked") final V get(); final void set(V value); @SuppressWarnings("unchecked") final void remove(); @SuppressWarnings("unchecked") final void remove(InternalThreadLocalMap threadLocalMap);  }
@Test public void testRemove() { final InternalThreadLocal<Integer> internalThreadLocal = new InternalThreadLocal<Integer>(); internalThreadLocal.set(1); Assert.assertTrue("get method false!", internalThreadLocal.get() == 1); internalThreadLocal.remove(); Assert.assertTrue("remove failed!", internalThreadLocal.get() == null); }
@Test public void testRemove() { final InternalThreadLocal<Integer> internalThreadLocal = new InternalThreadLocal<Integer>(); internalThreadLocal.set(1); Assertions.assertEquals(1, (int)internalThreadLocal.get(), "get method false!"); internalThreadLocal.remove(); Assertions.assertNull(internalThreadLocal.get(), "remove failed!"); }