Added test to validate linkedList::clear()