David said that God has rebuked the nations, destroyed the wicked, and uprooted their cities (Psa. 9:5-6).
David also said that God upheld his right and his cause and destroyed his enemies (Psa. 9:3-4a). This means that God was not good to the world, but God was very good to David. David's thought was that his Judge in the heavens upheld his cause and destroyed his enemies. This is not according to the divine concept of the New Testament.
For this, David gave thanks to God and told out all God's wonders and praises (Psa. 9:1, 14a). Wonders are wonderful doings, and praises here mean virtues. Because David thought that God upheld his right and his cause, destroying all his enemies, he had to thank God and tell out all of His wonderful doings and virtues.
David said that God is a high refuge for the oppressed, not forsaking His seekers, remembering the slain, and not forgetting the cry of the afflicted (Psa. 9:9, 10b, 12). If God remembers the slain, David should not have forgotten Uriah, the one slain by him according to his conspiracy.
David advised others to put their trust in God, sing psalms to Him, declare His deeds among the peoples, and exult in God's salvation (Psa. 9:10-11, 14). In a sense, what David wrote in Psalms 914 is neither according to the Old or the New Testament. This is David's "testament."