Minister 'joking' over NSW trains: union