Adding tests for Message factory