@Override
    public E take() throws InterruptedException {
        final E e = super.take();
        memoryLimiter.releaseInterruptibly(e);
        return e;
    }
@Test
    void testTake() throws InterruptedException, ExecutionException {
        MemoryLimitedLinkedBlockingQueue<Runnable> queue = new MemoryLimitedLinkedBlockingQueue<>(instrumentation);
        ExecutorService executorService = Executors.newFixedThreadPool(1);
        Future<Runnable> takeResult = executorService.submit(queue::take);
        Thread.sleep(2000);
        queue.put(() -> { });
        takeResult.get();
        assertEquals(0, queue.size());
    }