Imam Musa Kadhim (a.s) got very few opportunities to express his generosity because he spent a good part of his life in prison. That is almost fifteen years. As a poet says:
The Imam’s imprisonment was so prolonged, That his youth and old age passed in prison.
In spite of this he was always helping the needy believers. One day an applicant came to him and pleaded that he was indebted for 400 dirhams. The Imam furnished him the amount. Then he said that his clothes were completely worn out. The Imam gave him his own dress. Now he said that he had no mount to ride on. The Imam gave him a horse. After that the man said that he did not know the way. The Imam sent his slave along with him. Finally the man said, “Master! I have no need for all these things. I had only come to test the generosity of Ahl ul-Bayt. I am actually a very wealthy man, and I have brought these 5000 dirhams for you. It is by way of Khums payment.” The Imam smiled, took the money and at that very moment summoned the needy Sadat (Syeds) and distributed it all among them.
Reference :Akhlaq al-A’imma, Morals & Manners of the Holy Imams