Fixed unit tests for new logic: messageSize is fetched only for envelope