Added test and method for sorting a gift code