[PATCH PM-QA 1/2] Test: Add sort function