encodeHandoverRequest() tests and fixes.