public BufferPool get() {
        WeakReference<BufferPool> ref = threadLocal.get();
        if (ref == null) {
            BufferPool pool = bufferPoolFactory.create(serializationService);
            ref = new WeakReference<>(pool);
            strongReferences.put(Thread.currentThread(), pool);
            threadLocal.set(ref);
            return pool;
        } else {
            BufferPool pool = ref.get();
            if (pool == null) {
                throw notActiveExceptionSupplier.get();
            }
            return pool;
        }
    }
@Test
    public void get_whenDifferentThreads_thenDifferentInstances() throws Exception {
        BufferPool pool1 = bufferPoolThreadLocal.get();
        BufferPool pool2 = spawn(() -> bufferPoolThreadLocal.get()).get();

        assertNotSame(pool1, pool2);
    }