[DT/AS] refactor unit tests, and add parent class sorter