Sunan Ibn Majah, Book 13, Hadith 3 (In-Book)

It was narrated that 'Ali said: “The Messenger of Allah sent me to Yemen. I said: 'O Messenger of Allah, you are sending me to judge between them while I am a young man, and I do not know how to judge.' He struck me on the chest with his hand and said: 'O Allah, guide his heart and make his tongue steadfast.' And after that I never doubted in passing judgment between two people.”

حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا يَعْلَى، وَأَبُو مُعَاوِيَةَ عَنِ الأَعْمَشِ، عَنْ عَمْرِو بْنِ مُرَّةَ، عَنْ أَبِي الْبَخْتَرِيِّ، عَنْ عَلِيٍّ، قَالَ بَعَثَنِي رَسُولُ اللَّهِ صلى الله عليه وسلم إِلَى الْيَمَنِ فَقُلْتُ يَا رَسُولَ اللَّهِ تَبْعَثُنِي وَأَنَا شَابٌّ أَقْضِي بَيْنَهُمْ وَلاَ أَدْرِي مَا الْقَضَاءُ قَالَ فَضَرَبَ فِي صَدْرِي بِيَدِهِ ثُمَّ قَالَ ‏ "‏ اللَّهُمَّ اهْدِ قَلْبَهُ وَثَبِّتْ لِسَانَهُ ‏" ‏ ‏.‏ قَالَ فَمَا شَكَكْتُ بَعْدُ فِي قَضَاءٍ بَيْنَ اثْنَيْنِ ‏.‏

sunnah.com