Refactored card equal comparison test case