@Test
public void testPoolExhaustion2() {
int maxID = 10000;
MockIDAuthority idauth = new MockIDAuthority(200, maxID + 1);
StandardIDPool pool = new StandardIDPool(idauth, 0, Integer.MAX_VALUE, 2000, 0.2);
for (int i = 1; i < maxID * 2; i++) {
try {
long id = pool.nextID();
assertTrue(id <= maxID);
} catch (IDPoolExhaustedException e) {
assertEquals(maxID + 1, i);
break;
}