1 Samuel 26:9 (ESV) … “But David said to Abishai, “Do not destroy him, for who can put out his hand against the Lord’s anointed and be guiltless?”
When David had an opportunity to kill Saul, he held back. He reasoned, “Who can lay a hand on the Lord’s anointed and be guiltless? As surely as the Lord lives … the Lord Himself will strike him; either his time will come and he will die, or he will go into battle and perish” (vv. 9–10).
David’s trust in God was vividly demonstrated in his restraint. So too was his determination to do right, no matter how another provoked him.
The New Testament expresses this principle in a different way. We are to do good to those who persecute us so that we can be like the Lord, who does good to His enemies.
Matthew 5:43–48 (ESV) ... 43 “You have heard that it was said, ‘You shall love your neighbor and hate your enemy.’ 44 But I say to you, Love your enemies and pray for those who persecute you, 45 so that you may be sons of your Father who is in heaven. For he makes his sun rise on the evil and on the good, and sends rain on the just and on the unjust. 46 For if you love those who love you, what reward do you have? Do not even the tax collectors do the same? 47 And if you greet only your brothers, what more are you doing than others? Do not even the Gentiles do the same? 48 You therefore must be perfect, as your heavenly Father is perfect.
David’s restraint was because he trusted in God. David did not know how the Lord would deal with Saul, but trust in God means believing that God’s promises will come to pass in God’s time and in God’s way. 
In life we will face battles and enemies. While those enemies may not be an anointed leader like Saul, we still will find ourselves tested to trust in God. To respond in God’s way and trust God to respond in his time.