Increase test coverage of `trim` methods and `_.sortBy`.