/** java.util.AbstractQueue#remove() */ public void test_remove() { char c = 'a'; queue.add(c); c = 'b'; queue.add(c); assertEquals('a', queue.remove()); assertEquals('b', queue.remove()); try { queue.remove(); fail("should throw NoSuchElementException"); } catch (NoSuchElementException e) { // expected } }
/** java.util.AbstractQueue#remove() */ public void test_remove_null() { try { queue.remove(); fail("should throw NoSuchElementException"); } catch (NoSuchElementException e) { // expected } }