testing decorate_sort_undecorate method