@Test
public void testEnqueue()
{

    DoublyLinkedList<Integer> list = new DoublyLinkedList<Integer>();
    list.enqueue(1);
    assertFalse(list.isEmpty());
    assertEquals(1, list.size());
    assertArrayEquals(new Integer[]{1}, list.toArray());
    list.enqueue(2);
    assertFalse(list.isEmpty());
    assertEquals(2, list.size());
    assertArrayEquals(new Integer[]{2, 1}, list.toArray());
    list.enqueue(3);
    assertFalse(list.isEmpty());
    assertEquals(3, list.size());
    assertArrayEquals(new Integer[]{3, 2, 1}, list.toArray());
    assertEquals(new Integer(3), list.first());
    assertEquals(new Integer(1), list.last());
}