encodeHandoverRequest() tests and fixes.
Merge pull request #19080 from kamituel/Bug_1007237

Bug 1007237 - encodeHandoverRequest() unit tests and improvements. r=alive