Omit last empty string from MOTD reply
Refactor unittests