assertTrue(null == queue.peek());
}
public void testAdd() {
DummyTask task = new DummyTask(PRIORITY);
queue.add(task);
assertEquals(queue.peek(), task);
for (int i = 0; i < SIZE/2; i++) {
queue.add(new DummyTask(SIZE));
}
queue.add(task);
assertEquals(queue.peek(), task);
boolean exceptionOccurred = false;
try {
for (int i = 0; i < SIZE; i++) {
queue.add(new DummyTask(SIZE));
}
} catch (IllegalStateException e) {
exceptionOccurred = true;
}