The Bodhisatta was once a royal treasurer. One day as he walked to the palace, some men invited him to sit with them and drink some rare liquor. The Bodhisatta did not drink alcohol, but he knew an invitation like this could be a ruse; and if so, he wanted to expose it. He agreed to join them, but said he could not drink before going to the king’s palace. They should wait for him and he would think about joining them when he returned. After his business was finished, the Bodhisatta saw the men again, and their bowls were still full. If the liquor was actually good, they would have drunk some already. He told them he knew they were thieves and that they had drugged the liquor.
In the Lifetime of the Buddha
One day some men who had no money decided to rob Anathapindika, a wealthy supporter of the Buddha known for his extreme generosity. Knowing that Anathapindika wore his rings and richest attire when he went to see the king, they set up a table along his regular route to the palace and invited him to sit down and drink some rare liquor. Anathapindika did not drink, but he knew this was likely a ruse and agreed so that he could expose them. After sitting for a while and seeing that the men did not drink any of their liquor, he was certain it was drugged. He told them he knew what they were up to and challenged the men to take the first swig. The thieves got up and fled.
When Anathapindika told the Buddha about this incident, the Buddha told him this story so he knew that these same men had tried to do the same thing to he himself during earlier births.