@Test
public void testAddAll() throws URISyntaxException
{
Collection<Link> links = new LinkedList<Link>();
links.add(new LinkTask(null, new URI("http://www.example.com"), 0));
links.add(new LinkTask(null, new URI("http://www.example.com/1"), 1));
links.add(new LinkTask(null, new URI("http://www.example.com/2"), 1));
links.add(new LinkTask(null, new URI("http://www.example.com/3"), 1));
links.add(new LinkTask(null, new URI("http://www.example.com/4"), 1));
Queue<Link> queue = new SimpleTaskQueueWithHistory<Link>();
assertEquals(0, queue.size());
queue.addAll(links);
assertEquals(5, queue.size());
links.add(new LinkTask(null, new URI("http://www.example.com/1"), 1));
links.add(new LinkTask(null, new URI("http://www.example.com/5"), 1));
links.add(new LinkTask(null, new URI("http://www.example.com/2"), 1));
queue.addAll(links);
assertEquals(6, queue.size());
queue.poll();