final ISemaphore semaphore = hz.getSemaphore(randomMapName());
int numberOfPermits = 20;
assertTrue(semaphore.init(numberOfPermits));
for (int i = 0; i < numberOfPermits; i++) {
assertEquals(numberOfPermits - i, semaphore.availablePermits());
assertEquals(semaphore.tryAcquire(), true);
}
assertFalse(semaphore.tryAcquire());
assertEquals(semaphore.availablePermits(), 0);
}