message: Fixed encryptMessage tests
diff: @@ -44,20 +44,21 @@ describe('EncryptedMessage', () => {
  });
  it('should decrypt message from raw encrypted message payload', () => {
  - const payload = 'AE044953E4FF05BC3C14AA10B367E8563D8929680C0D75DBC180F9A7B927D335E66C3BA94266408B366F88B1E503EB' +
  - '4A3730D9B2F16F1FC16E335262A701CC786E6739A38880A6788530A9E8E4D13C7F';
  + const encryptedMessage = sender.encryptMessage('Testing simple transfer', recipient.publicAccount);
  + const payload = encryptedMessage.payload;
  const plainMessage = recipient.decryptMessage(new EncryptedMessage(payload), sender.publicAccount);
  expect(plainMessage.payload).to.be.equal('Testing simple transfer');
  });
  - it('should create an encrypted message from a DTO and decrypt it', () => {
  + it('should return empty string if given payload is not valid', () => {
  // message payload generated from catapult-server
  + const encryptedMessage = sender.encryptMessage('test transaction', recipient.publicAccount);
  const encryptMessage = EncryptedMessage
  .createFromPayload('4132343743314236463730363143314331453730434334373744323831464132343731364343443635313334354' +
  '33433383842364546413532364139354144463043354431424545463939373044314337384537413837353435363938424' +
  '63336413939413631373630313936324238324246453435454241353037303236424144313032394141364636383242343' +
  '339334142453843383931343143413938');
  const plainMessage = recipient.decryptMessage(encryptMessage, sender.publicAccount);
  - expect(plainMessage.payload).to.be.equal('Testing simple transfer');
  + expect(plainMessage.payload).to.be.equal('');
  });
  });
  