From November 7, 2009:
Jonathan Edwards explains that God does not test men so He can find evidence they are indeed sincere. Rather, He test them, already knowing their response to the test, so that He can show them where their hearts are.
For when God is said by these things to try men, and prove them, to see what is in their hearts, and whether they will keep his commandments or no; we are not to understand, that it is for his own information, or that he may obtain evidence himself of their sincerity (for he needs no trials for his information); but chiefly for their conviction, and to exhibit evidence to their consciences. (Edwards, Jonathan. A Treatise Concerning Religious Affections. United States: Kessinger Publishing. 2003. p278)