This was written to Christians. God tests our hearts. He wants to know, to find out, to see for Himself, through the circumstances that He creates or allows to occur, what our reaction will be. He does not assume; He does not presume that He already knows. God tests, and He is watching. This is why He can be a witness.