@Test
public void testDefaultPooling() throws InterruptedException {

  // Small images won't be pooled
  CountDownLatch countDown = new CountDownLatch(1);
  ImagePoolImpl.ImageImpl image1 = myPool.create(10, 10, BufferedImage.TYPE_INT_ARGB, (b) -> countDown.countDown());
  BufferedImage internalPtr = image1.myBuffer;
  //noinspection UnusedAssignment
  image1 = null;
  gc();
  countDown.await(3, TimeUnit.SECONDS);
  assertNotEquals(internalPtr, myPool.create(10, 10, BufferedImage.TYPE_INT_ARGB, null).myBuffer);
}