Refactor sort tests by extending from base class