@Test
public void testAdd()
{

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