int numberOfPermits = 20;
assertTrue(semaphore.init(numberOfPermits));
for (int i = 0; i < numberOfPermits; i += 5) {
assertEquals(numberOfPermits - i, semaphore.availablePermits());
semaphore.reducePermits(5);
}
assertEquals(semaphore.availablePermits(), 0);
}