@Test
public void testDrainTo()
{

   ArrayList<FairQueueTestString> list = new ArrayList<>();
   queue.offer(new FairQueueTestString("key1", "item1"));
   queue.offer(new FairQueueTestString("key1", "item2"));
   queue.offer(new FairQueueTestString("key1", "item3"));
   queue.offer(new FairQueueTestString("key2", "item4"));
   queue.offer(new FairQueueTestString("key2", "item5"));
   Assert.assertEquals(queue.size(), 5);
   Assert.assertEquals(queue.drainTo(list), 5);
   Assert.assertEquals(queue.size(), 0);
   Assert.assertEquals(list.size(), 5);
   Assert.assertEquals(list.get(0).getItem(), "item1");
   Assert.assertEquals(list.get(1).getItem(), "item4");
   Assert.assertEquals(list.get(2).getItem(), "item2");
}