clearCard function is tested.