Added test for trailing space case