Bug 1007237: encodeHandoverRequest() unit tests and improvements