Sayyiduna Ali (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) sent me to Yemen as a judge. I said: "O Messenger of Allah! I am young, and I have no knowledge of judging." He (peace and blessings be upon him) said: "Allah will soon guide your heart and keep your tongue firm. When you sit to judge, give judgement after hearing both of them. That is more likely to make the judgement clear to you." I always continued judging in this way, or: I had no doubt in judging (after that).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20487