Ibn Shubrumah (may Allah have mercy on him) narrates from Hasan (may Allah have mercy on him) concerning the saying of Allah Almighty: "And consult them in the matter" [Surah Al Imran: 159], that Allah, the Lord of Might, taught those who would come after, for he (peace and blessings be upon him) himself had no need of it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20304