David is most well known for being a man after God's own heart. We know that David must have been very devoted to God and always desired to obey him, because the reason he was a man after God's own heart was not that he was almost sinless. David was far from sinless, from his adultery with Bathsheba to his taking a census against the Lord's will. David's faith and trust were tested many times throughout his life, however, and he remained faithful.