Mask trailing whitespace in test sample.