Implement and test map compare method.