[#5432] Added test

- Finally determined a way to add a test for this.
[#5432] CS fixes

- Trailing whitespace