John 7:17
“If any man will do His will, he shall know of the doctrine, whether it be of God, or whether I speak of Myself.”
What He says is this, “Cast out from yourselves the malice and wrath and envy and hatred which has without cause been conceived against Me, then there is nothing to hinder you from knowing that My words are indeed the words of God. For at present these things cast a darkness over you, and destroy the light of right judgment, while if you remove them this shall no longer be your case.” Yet He spoke not (plainly) thus, (for so He would have confounded them exceedingly,) but implied it all by saying, “He that does His will shall know of the doctrine, whether it is of God, or whether I speak of Myself”; that is, “whether I speak anything different and strange and contrary to God.” For, “of Myself” is always put with this meaning, that “I say nothing except what seems good to Him, but all that the Father wills, I will also.”
“If any man do His will, he shall know of the doctrine.”
“What means,” “If any man do His will?” “If any man be a lover of the life which is according to virtue, he shall know the power of the sayings.” “If any man will give heed to the prophecies, to see whether I speak according to them or not.”
2. But how is the doctrine His and not His? For He said not, “This doctrine is not Mine”; but having first said, “it is Mine,” and having claimed it as His own, He then added, “it is not Mine.” How then can the same thing be both “His” and not “His”? It is “His,” because He spoke it not as one who had been taught; and it is “not His,” because it was the doctrine of the Father. How then says He, “All that is the Father's is Mine, and Mine His”? “For if because the doctrine is the Father's, it is not yours, that other assertion is false, for according to that it ought to be yours.” But the “is not Mine,” affords a strong proof that His doctrine and the Father's are one; as if He had said, “It has nothing different, as though it were another's. For though My Person be different, yet so do I speak and do as not to be supposed to speak or do anything contrary to the Father, but rather the very same things that the Father says and does.” Then He adds another incontrovertible argument, bringing forward something merely human, and instructing them by things to which they were accustomed. And what is that?
Source: Homilies on the Gospel of John (New Advent)