Search me. Know my heart.
Try me. Know my thoughts.
Your heart determines your intentions.
Your thoughts determine your actions.
A right heart will produce the right actions not the other way around.
Search me, O God, and know my heart: try me, and know my thoughts: And see if there be any wicked way in me, and lead me in the way everlasting.
Psalm 139:23-24 KJV