deserializing message and returning it; +unit test