Fixed trailing whitespace sensitivity in tests