I am still studying the life of David and in I Samuel 29, we find that David had been living with the Philistines for three years while he was hiding from Saul. The Philistines were now going into battle against the Israelites, David's country. David was in a bad situation! If he fought against the armies of God, he may be labeled an enemy of the God of Israel and also be thought of as a traitor to his country. His people may hate him and also they may oppose him becoming the King of Israel. If Saul was killed in the battle, the people may accuse David of killing him. God could have allowed David to go into the battle, but He made a way of escape for David.
Deliverance came when the lords of the Philistines opposed David going to battle with them. They remembered a song that had been sung about David in the past. "Saul slew his thousands and David his ten thousands." They thought David may betray them and fight for Israel. They did not trust him. So, Achish, the king of the Philistines, went to talk to David. He told David, "thou hast been upright, and thy going out and thy coming in with me in the host is good in my sight: for I have not found evil in thee since the day of thy coming unto me unto this day:" He also told him a little later, "thou art good in my sight, as an angel of God." What a testimony! On a side note, how is your testimony among the lost? Would they say that you were good and upright? Do they see Christ in you? I sure do hope so!
Back to the story, Achish then told David that the lords did not want him to go to battle with them. I am sure David was relieved to find out that he did not have to fight against his countrymen. God knew that David was needed elsewhere. Matthew Henry once said, "What he does with us we know not now, but we shall know hereafter, and shall see it was all for good". Sometimes I will call one of my children to do something and they will start fussing and complaining before they even know what I wanted. Usually when they find out what I wanted, they will say, "Oh, I didn't know that was all you wanted." God knows what we do not know and we need to, like David, learn to trust in Him.