// Path: core/src/main/java/com/github/phantomthief/pool/impl/DynamicCapacityLinkedBlockingQueue.java
// public static <T> BlockingQueue<T> lazyDynamicCapacityLinkedBlockingQueue(IntSupplier capacity) {
//     return new LazyBlockingQueue<>(() -> new DynamicCapacityLinkedBlockingQueue<>(capacity));
// }


import static com.github.phantomthief.pool.impl.DynamicCapacityLinkedBlockingQueue.lazyDynamicCapacityLinkedBlockingQueue;
import static com.google.common.util.concurrent.SimpleTimeLimiter.create;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static java.util.concurrent.Executors.newFixedThreadPool;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeoutException;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.TimeLimiter;
package com.github.phantomthief.pool.impl;





/**
 * @author w.vela
 * Created on 2020-08-20.
 */
class DynamicCapacityLinkedBlockingQueueTest {
    private static final Logger logger = LoggerFactory.getLogger(DynamicCapacityLinkedBlockingQueueTest.class);

    @Test
    void test() throws InterruptedException {
        int[] count = {0};
        boolean[] access = {false};
// Path: core/src/main/java/com/github/phantomthief/pool/impl/DynamicCapacityLinkedBlockingQueue.java
// public static <T> BlockingQueue<T> lazyDynamicCapacityLinkedBlockingQueue(IntSupplier capacity) {
//     return new LazyBlockingQueue<>(() -> new DynamicCapacityLinkedBlockingQueue<>(capacity));
// }


// Path: core/src/test/java/com/github/phantomthief/pool/impl/DynamicCapacityLinkedBlockingQueueTest.java
import static com.github.phantomthief.pool.impl.DynamicCapacityLinkedBlockingQueue.lazyDynamicCapacityLinkedBlockingQueue;
import static com.google.common.util.concurrent.SimpleTimeLimiter.create;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static java.util.concurrent.Executors.newFixedThreadPool;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeoutException;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.TimeLimiter;

package com.github.phantomthief.pool.impl;





/**
 * @author w.vela
 * Created on 2020-08-20.
 */
class DynamicCapacityLinkedBlockingQueueTest {
    private static final Logger logger = LoggerFactory.getLogger(DynamicCapacityLinkedBlockingQueueTest.class);

    @Test
    void test() throws InterruptedException {
        int[] count = {0};
        boolean[] access = {false};
        BlockingQueue<Object> queue = lazyDynamicCapacityLinkedBlockingQueue(() -> {