@Test(expected = ConcurrentModificationException.class)
public void testConcurrentModification()
{

    DoublyLinkedList<Integer> list = new DoublyLinkedList<Integer>();
    list.add(1);
    list.add(2);
    list.add(3);
    for (int i : list)
    {
        if (i == 2)
        {
            list.add(4);
        }
    }
}