Here is my take, you can take it or leave it.
God was not testing Abraham for His own sake. God was testing Abraham for Abraham's sake. This was to build the faith within Abraham. God knows before hand everything. Why could God make this promise to Abraham if He would know that Abraham's faith was not going to be strong ehough? God had to prove to Abraham his own faith is strong, and strong enough to carry out the will of God. Ramamber God works in ways we do not always understand. God could just change everything as He wants, but that would remove His created people's free will.