Reworked MessageTest into unit tests