Code example for ArrayBlockingQueue

Methods: take

0
 
    @Threaded 
    public void threadTakeTake() throws InterruptedException 
    { 
        waitForTick(1); 
        assertTrue(buf.take() == 42);
        assertTrue(buf.take() == 17);
    } 
 
    @Test 
    public void finish() 
    { 
        assertTrue(buf.isEmpty());
    } 
}