public boolean acquire(final Object o) {
        if (Objects.isNull(o)) {
            throw new NullPointerException();
        }
        if (memory.sum() >= memoryLimit) {
            return false;
        }
        acquireLock.lock();
        try {
            final long sum = memory.sum();
            final long objectSize = inst.getObjectSize(o);
            if (sum + objectSize >= memoryLimit) {
                return false;
            }
            memory.add(objectSize);
            if (memory.sum() < memoryLimit) {
                notLimited.signal();
            }
        } finally {
            acquireLock.unlock();
        }
        if (memory.sum() > 0) {
            signalNotEmpty();
        }
        return true;
    }
@Test
    public void testAcquireWithTimeWaitNotRelease() throws InterruptedException {
        MemoryLimiter memoryLimiter = new MemoryLimiter(testObjectSize + 1, instrumentation);
        memoryLimiter.acquire(testObject);
        assertFalse(memoryLimiter.acquire(testObject, 1, TimeUnit.SECONDS));
    }