Testing addElement()