Unit tests for message controller