This story is very similar to an old anecdote associated with Zhu Yuanzhang, the first Ming Emperor. Supposedly during his attempts to overthrow the Yuan Dynasty, he lost in one battle and almost died of exhaustion. Two vagrants helped him by feeding him soup made from spoiled rice, leftovers, and various wild plants. He recovered and praised the food, saying that it was the best dish he ever tasted.
After he became emperor he missed the soup. He then ordered his officials to scour the land to find the vagrants and told them to remake the dish. He also announced a banquet for officials to taste the best dish ever. The vagrants did the dish the exact way. The smell was so bad that the entire kitchen's staff left in disgust.
The dish was served to the Emperor. Not surprisingly, he immediately regretted it. His honor, however, demanded him to eat the entire thing, and the officials in the banquet had no choice but to finish it also.
The story ended happily, as the vagrants were still richly rewarded and they were quietly kicked out from the palace.