Unit test createFromMessage method