Daniel, a prophet, purposed in his heart to obey God and not be defiled, so he asked the chief of eunuchs to be tested for 10 days by eating only vegetables and drinking water instead of the king's food and wine. The chief favored Daniel and saw that he was healthier after 10 days on vegetables and water compared to the others eating the king's food.