@Test
public void testPoolDoesntOverFill() throws Exception {

    ObjectFactory<MirageRequest> factory = Mockito.mock(ObjectFactory.class);
    ObjectPool<MirageRequest> pool = new ObjectPool<>(factory, 3);
    pool.recycle(new MirageRequest());
    pool.recycle(new MirageRequest());
    pool.recycle(new MirageRequest());
    pool.recycle(new MirageRequest());
    pool.recycle(new MirageRequest());
    Assert.assertEquals(3, getPoolSize(pool));
}