Add tests for SortTypeException.