public void clear() {
        strongReferences.clear();
    }
@Test
    public void clear() {
        // store the pool in a weak reference since we don't want to force a strong reference ourselves.
        final WeakReference<BufferPool> poolRef = new WeakReference<>(bufferPoolThreadLocal.get());

        // call clear; kills the strong references.
        bufferPoolThreadLocal.clear();

        assertTrueEventually(() -> {
            System.gc();
            // eventually the reference should point to zero; indicating that the pool is gc'ed.
            assertNull(poolRef.get());
        });
    }