Refactoring for unit tests esdras

Fixed the test for MessageManagerTest