20 And, the husband being not yet called, still she does not understand, still she minds the flesh; for the man is absent: “I have not,” says she, “a husband.” And the Lord proceeds and utters mysteries. You may understand that woman really to have had at that time no husband; she was living with some man, not a lawful husband, rather a paramour than a husband. And the Lord said to her, “You have well said, I have not a husband.” How then did Thou say, “Call your husband”? Now hear how the Lord knew well that she had not a husband. “He says to her,” etc. In case the woman might suppose that the Lord had said, “You have well said, I have not a husband,” just because He had learned this fact of her, and not because he knew it by His own divinity, hear something which you have not said: “For you have had five husbands, and he whom you now have is not your husband; this you have said truly.”
Source: Tractates on the Gospel of John (New Advent)