Added junit tests for messenger.