The two brothers, the famed The Rebbe Reb Elimelech of Lyzensk and The Rebbe Reb Zushe of Anipoli, often wandered about together posing as simple beggars.
They would mingle with the masses; listening, teaching, speaking, helping and guiding whomever and whenever they could.
Once while traveling with a group of vagabonds, members of the group were accused of being thieves, resulting in the entire bunch being thrown into jail. Confident of their innocence and eventual release, the two brothers sat quietly. As the afternoon progressed, Reb Melech stood up to prepare himself to daven mincha. . . .
"But why weep?" continued Rebbe Zushe. "Don't you know that the same G‑d who commanded you to pray, also commanded you not to pray when the room is unfit for prayer? By not praying in this room, you have achieved a connection with G‑d. True, it is not the connection that you had sought. Yet, if you truly want the Divine connection, you would be happy that G‑d has afforded you the opportunity to obey His law at this time, no matter what it is."
"You are right, my brother!" exclaimed Rebbe Elimelech, suddenly smiling. The feelings of dejection banished from his heart and mind, Rebbe Elimelech took his brother's arm and began to dance from joy as a result of performing the mitzvah of not praying in an inappropriate place.
full story here... http://www.chabad.org/library/article_cdo/aid/619475/jewish/The-Joy-of-a-Mitzvah.htm