How do pilots detect fuel contamination in flight?
If fuel contamination is suspected (because of engine control system fault indications, slow engine responses or rapid engine pressure ratio (EPR) fluctuations), there is an associated checklist procedure to followed which can confirm the contamination:

Fuel contamination checklist as posted by "330 skipper" at Nov 24th 2017 13:47Z on Avherald:


  
  If ENG 1(2) CTL SYS FAULT alert triggered associated with AVOID RAPID THR CHANGES or ENG 1(2) SLOW RESPONSE, and with rapid and
  continuous EPR fluctuation indications on both engines:
  A/THR.........................................................................................................OFF
  If EPR fluctuations stop on both engines: ECAM PROC..........................................................................................APPLY
  A/THR.........................................................................................KEEP
  OFF
  If EPR fluctuations continue on both engines: FUEL CONTAMINATION CONFIRMED Apply condition: If fuel contamination confirmed 
  If ENG 1 CTL SYS FAULT and ENG 2 CTL SYS FAULT alerts triggered with AVOID RAPID THR CHANGES or ENG 1(2) SLOW RESPONSE:
  A/THR.....................................................................................................OFF
  FUEL CONTAMINATION CONFIRMED Apply condition: If fuel contamination
  confirmed 
  If fuel contamination confirmed: LAND ASAP
  




In addition, the Flight Crew Operating Manual (FCOM) has the following procedure to be followed if fuel contamination is confirmed:





Special thanks to @mins for providing the images of the procedure and the FCOM