@Test
public void Should_incrementCounterWhenExceptionIsThrown()
        throws Exception {

    Supplier func = mock(Supplier.class);
    when(func.get()).thenThrow(new RuntimeException()).thenReturn(new Object());
    Pool pool = new Pool(1, func);
    try {
        pool.take();
        fail();
    } catch (PoolTakeException ignored) {}
    assertNotNull(pool.take());
}