. truly amazing that a brand new aeroplane can have apparently no problems .. then ... coincidental Comm and TXPDR/TCAS faults that both correct immediately after a bump!
Many electrical faults can be cleared (albeit sometimes only temporarily) by a "shock".
(In the computer and control systems worlds) a sharp tap on the top of a circuit board to "reseat it" can do it, or plugging and unplugging a connector. All it takes is a bit of muck, corrosion (not on a new machine admittedly) or dust/grit, which can be shifted by a "bump" - or a "calibrated thump".
As was mentioned earlier, "intermitent" electrical faults can be a real bugger to find - they always disappear just when the engineer arrives to fix them.