Daniel was tested when the wise men could not interpret the King's dream, and the King passed an order to destroy all the wise men of Babylon (Daniel 2:1- 13). When Daniel heard this, he was calm and he handled the situation with great wisdom (Daniel 2:14). Here was a young man who had great wisdom!
How did Daniel get the answer to the dream that Nebuchadnezzar had? First of all, he had faith that God would reveal it to him. He went to God. He called his friends (Daniel 2:17). There is a tremendous value in fellowship in prayer when we face a problem that is too difficult for us. Daniel understood the principle of fellowship in prayer. He was a new covenant man living in old covenant times. His attitude was, "Let me not pray about this all by myself. Let me get my three brothers to join me and let us pray together." And they prayed together and he said, "Let us ask God to show us mercy and reveal this to us" (Daniel 2:18).
They began their prayer with a time of praise. This is always a good habit. They said, "Praise the Lord for His sovereignty. He is the One who determines the course of all events in the world. He is the One who removes kings and sets others on the throne. He is the One who gives wisdom to the wise and knowledge to the scholars. He is the One who reveals deep and mysterious things… We thank and praise You, God, because You have given us wisdom and strength" ( Daniel 2:20-23). Any time you find that you can't get through in prayer, you should start praising the Lord. Think of God's greatness and praise Him - and you will find the atmosphere clearing up immediately..
Then God revealed the dream and its meaning to Daniel. And he went and gave the king the answer, acknowledging, "This is not due to my cleverness. It is because God revealed it to me" ( Daniel 2:30). Daniel was a humble young man who was willing to give God all the glory. God reveals His truths to such men.
Daniel was tested again when the evil people in that kingdom who were jealous of Daniel wanted to destroy him. They went to the king and got him to pass a law that was primarily directed against Daniel. The threat was, "If you pray to any other god, you will be thrown to the lions" (Daniel 6:6- 13).
When Daniel heard that the king had passed this law, what did he do? He knelt down and prayed. He feared God more than he feared any king or government. And like the apostles would say in a future day, Daniel's attitude too was, "We ought to obey God rather than men" (Acts. 5:29). So the very thing that the king's edict said he was not to do, he did. No law was going to stop him from praying to his God. He used to pray always with his windows open towards Jerusalem. He could now have considered praying with his windows closed. But he was not ashamed to be seen praying to the only true God, and so he kept the windows open. We too must never be ashamed to be openly known as disciples of the Lord Jesus Christ.
And he prayed not just once a day, but three times a day - as he had always done. Those jealous officials were just waiting for this moment - and as soon as they saw Daniel praying, they reported him to the king. The king liked Daniel and wanted to save him. But the officials reminded him that "the law of the Medes and the Persians" could not be revoked. So he had to throw Daniel into the den of lions. But, as we know, God protected Daniel from the lions.
Daniel's life was a testimony to the people of Medo-Persia concerning the true God. God allows trials to come to us too, in order to manifest our testimony to others. When we endure in persecution and love our persecutors, others will see Christ in us. And if we have to lay down our lives for the gospel one day, let us lay it down with our heads lifted up and a spirit of praise in our hearts to the Lord because we know that our God is on the throne.