TRUNK-3197: An option is added for each sort item to be asc or desc, unit tests added