Exemplo n.º 1
0
  @Test
  public void testRemove() throws IOException {
    final IQueue q = client.getQueue(randomString());

    q.offer(1);
    assertTrue(q.remove(1));
    assertFalse(q.remove(2));
  }
Exemplo n.º 2
0
 @Test
 public void testRemoveTop() throws IOException, InterruptedException {
   final IQueue q = client.getQueue(randomString());
   q.offer(1);
   assertEquals(1, q.remove());
 }
Exemplo n.º 3
0
 @Test(expected = NoSuchElementException.class)
 public void testEmptyRemove() throws IOException {
   final IQueue q = client.getQueue(randomString());
   q.remove();
 }