assert queue.size() == 0;
}
public static void testInsertionAndRemoval() throws Exception {
final Queue queue=new Queue();
String s1="Q1", s2="Q2";
queue.add(s1);
assert queue.getFirst() != null;
assert queue.getLast() != null;
assert queue.getLast().equals(queue.getFirst());
queue.add(s2);
assert queue.getFirst() != queue.getLast();
Object o1=queue.peek();
Object o2=queue.getFirst();
System.out.println("o1=" + o1 + ", o2=" + o2 + ", o1.equals(o2)=" + o1.equals(o2));
assert queue.getFirst().equals(queue.peek());
queue.remove();
assert queue.size() == 1;
assert queue.getLast().equals(queue.getFirst());
queue.remove();
assert queue.size() == 0;
assert queue.getFirst() == null;
assert queue.getLast() == null;
}