public ListNode2<T> add(T value) {
        ListNode2<T> node = new ListNode2<T>(value);
        if (size++ == 0) {
            tail = node;
        } else {
            node.prev = head;
            head.next = node;
        }

        head = node;

        return node;
    }
@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);
            }
        }
    }