Alleged spy 'talked about going to Iran for training', court hears