Language:
كتاب التوحيد
97  
Oneness, Uniqueness of Allah (Tawheed)
(31)
Chapter: (Allah’s) Wish and Will
(31)
باب فِي الْمَشِيئَةِ وَالإِرَادَةِ
Sahih al-Bukhari 7466

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "The example of a believer is that of a fresh green plant the leaves of which move in whatever direction the wind forces them to move and when the wind becomes still, it stand straight. Such is the similitude of the believer: He is disturbed by calamities (but is like the fresh plant he regains his normal state soon). And the example of a disbeliever is that of a pine tree (which remains) hard and straight till Allah cuts it down when He will." (See Hadith No. 546 and 547, Vol. 7).

حَدَّثَنَا مُحَمَّدُ بْنُ سِنَانٍ، حَدَّثَنَا فُلَيْحٌ، حَدَّثَنَا هِلاَلُ بْنُ عَلِيٍّ، عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ مَثَلُ الْمُؤْمِنِ كَمَثَلِ خَامَةِ الزَّرْعِ، يَفِيءُ وَرَقُهُ مِنْ حَيْثُ أَتَتْهَا الرِّيحُ تُكَفِّئُهَا، فَإِذَا سَكَنَتِ اعْتَدَلَتْ، وَكَذَلِكَ الْمُؤْمِنُ يُكَفَّأُ بِالْبَلاَءِ، وَمَثَلُ الْكَافِرِ كَمَثَلِ الأَرْزَةِ صَمَّاءَ مُعْتَدِلَةً حَتَّى يَقْصِمَهَا اللَّهُ إِذَا شَاءَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 7466
In-book reference : Book 97, Hadith 92
USC-MSA web (English) reference : Vol. 9, Book 93, Hadith 558
  (deprecated numbering scheme)