@Override
  public T acquire() {
    return acquire(WAIT_INDEFINITELY, null);
  }
@Test
  public void resourcePoolTimestampOverflow() {
    Callable<Integer> task = () -> {
      ConcurrentLinkedQueue<Integer> queue = mock(ConcurrentLinkedQueue.class);
      TestResourcePool testPool = new TestResourcePool(2, queue);
      Integer resource1 = testPool.acquire(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
      Integer resource2 = testPool.acquire(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
      assertEquals(new Integer(1), resource1);
      assertEquals(new Integer(2), resource2);
      Integer resource3 = testPool.acquire(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
      assertNull(resource3);
      return resource3;
    };
    ExecutorService executor = Executors.newFixedThreadPool(1);
    Future<Integer> future = executor.submit(task);
    boolean timeout = false;
    try {
      future.get(5000, TimeUnit.MILLISECONDS);
    } catch (Exception ex) {
      timeout = true;
    }
    assertTrue(timeout);
    assertFalse(future.isDone());
    future.cancel(true);
  }