Test class refactored, custom comparing function