Easy Street
"Just out of interest, what exactly is tested by cycling the gear handle if the intent is for the legs not to move?"
According to the AAIB report (see earlier link), cycling the gear handle was the approved procedure to clear a number of maintenance messages related to a snag that the aircraft was carrying.
Why that was being done on the ramp just prior to departure, some 36+ hours after the aircraft had arrived at LHR, is a mystery.