Refactored tests and added weights for the generation of Message.