Exemplo n.º 1
0
  @Test
  public void testToArray() {
    final int maxItems = 19;
    final IQueue q = client.getQueue(randomString());

    Object[] offered = new Object[maxItems];
    for (int i = 0; i < maxItems; i++) {
      q.offer(i);
      offered[i] = i;
    }

    Object[] result = q.toArray();
    assertEquals(offered, result);
  }