TrimEnd and tests