Refactor heap sort test