1 Vindicate me, Lord, for I have led a blameless life; I have trusted in the Lord and have not faltered. 2 Test me, Lord, and try me, examine my heart and my mind; 3 for I have always been mindful of your unfailing love and have lived in reliance on your faithfulness.
4 I do not sit with the deceitful, nor do I associate with hypocrites. 5 I abhor the assembly of evildoers and refuse to sit with the wicked. 6 I wash my hands in innocence, and go about your altar, Lord, 7 proclaiming aloud your praise and telling of all your wonderful deeds.
David starts the Psalm by asking the Lord to vindicate him. Like many other Psalms, David asked him to vindicate him presumably from his enemies. Why? David says, "Becuase I have led a blameless life." Does that mean he has not made any mistakes. No! But David walks with the Lord. It is the tenor of his life. Though we can never be perfect in God's eyes, there is a trajectory that shows whether we are trusting in God or something else.
Then David says, "Test me and try me. Examine both my heart and mind." We see the humility of David saying in effect, "I think I am living uprightly, but if I am missing anything please let me know about it." The words test, try and examine usually deal more with our inner life. As Jesus said, "It is out of the inner man that come the thoughts and attitudes of the heart." A change of heart leads to a change of life.
How has David managed to keep a pure heart? Part of it is the company he keeps. He has kept his heart clean by avoiding people who are not walking uprightly, but have their hearts set on doing evil David says he does not "sit", "associate", or "keep company" with those whose hearts are set on wrongdoing. As we have all heard it said, "Bad company corrupts good morals"
C.S. Lewis had this to say about the importance of who we choose to assoicate with,
"But I am inclined to think a Christian would be wise to avoid, where he decently can, any meeting with people who are bullies, or lascivious, cruel, dishonest, spiteful and so forth. Not because we are ‘too good’ for them. In a sense we are not good enough. We are not good enough to cope with all the temptations, nor clever enough to cope with all the problems, which an evening spent in such society produces.” (C.S. Lewis, cited in Boice)
Finally, David gives the reason for his confidence. He relies on God's love and faithfulness. Though David walks in God's ways, he knows ultimately he needs to rely on God's love and grace. It is the one constant in his life. Notice David had to think about and rely on God's kindness. Although God forgives us as a free gift, we need to mindfully and intentionally rely on His mercy and grace, as has now been revealed in Christ Jesus. The key to our living a faithful Christian life is keeping our eyes on Jesus and the cross where he died!