@Test public void testGetMoreThanMaxWillBlock() { for (int i = 0; i < MAX_PERMITS; i++) { try { this.sem.acquire(); } catch (InterruptedException e) { fail(); } } this.timer.schedule(new ThreadInterruptTask(Thread.currentThread()), 100); try { this.sem.acquire(); fail(); } catch (InterruptedException e) { } }
void acquire() throws InterruptedException { this.semaphore.acquire(); }
CallSemaphore { void acquire() throws InterruptedException { this.semaphore.acquire(); } }
CallSemaphore { void acquire() throws InterruptedException { this.semaphore.acquire(); }  }
CallSemaphore { void acquire() throws InterruptedException { this.semaphore.acquire(); }   }
CallSemaphore { void acquire() throws InterruptedException { this.semaphore.acquire(); }    }