It was not an Air New Zealand captain or pilot in the seat for the Perpignan crash. He was a German pilot for the safety checks to return the plane to Air New Zealand. Very sad circumstance ... and nothing the crew could do to save themselves.
The crash was caused by pilot error - plain and simple.
The pilot was not a qualified test pilot.
Airbus specify that the AOA functional test MUST be carried out above 10000 ft AGL because if the test fails a lot of altitude will be lost in recovery.
He carried out the test at low level with predictable results.