assertTrue(semaphore.init(numberOfPermits));
for (int i = 0; i < numberOfPermits; i += 5) {
assertEquals(numberOfPermits - i, semaphore.availablePermits());
semaphore.acquire(5);
}
assertEquals(semaphore.availablePermits(), 0);
}
@Test(timeout = 30000)
public void testMultipleAcquire_whenNegative() throws InterruptedException {
final ISemaphore semaphore = hz.getSemaphore(randomString());