the question was "how would you know?"not "how did you get to know?" the former questions the entire possibility by demanding credentials, the latter questions the fact by demanding the proof and data to back up the claim.
if we agree to hold this mutual ground, then it reduces to the translation from chinese into english.
子非鱼安知鱼之乐
if to interprete as "how did you get to know the pleasure of the fish" then the chinese would put "何以""安能"云云...
子非我安知我之不知鱼之乐by the same token here we are really looking at the word "an", agree?