What does "how to testify" mean? We are to testify about Christ as Saviour, that is how we are to testify. God righteousness is not through works of law but by the faith of Christ. Christ is at the center of all laws which therefore have become/are satisfied by Him. Observe:
[Jhn 5:39 KJV] 39 Search the scriptures; for in them ye think ye have eternal life: and they are they which testify of me.
Christ's salvation is greater than our sin. Should we sin? No, but neither do they affect our salvation. Do you think that
King David remained saved? He committed many temporal sins, yet regardless of them he remained saved. Why?
Because it was God's will that he be saved.
The laws that someone choses to give paint us a picture of their character, so we see that someone is wise by seeing that they have given wise laws, we see that someone is foolish by seeing that they have given foolish laws, and so forth, and a wise person does not give stupid laws. So if I were describing the character of the God of Israel to someone, then I could show them the Mosaic Law, and they could from that that He is wise, holy, righteous, good, just, merciful, faithful, loving, and so forth, and by obeying those laws, I would be testifying about the character of the God of Israel, for example, by doing good works, I would be testifying about His goodness, which is why they give glory to Him (Matthew 5:16), which is also the way to have faith in God's goodness. The Son is the radiance of God's glory and the exact image of His nature (Hebrews 1:3), so in the same manner that everything in Scripture testifies about Father's character traits, it also testifies about those of the Son, and so the way to experientially know the Father and the Son is through delighting in practicing His character traits, which is eternal life (John 17:3), and God's law is His instructions for how to do that (Exodus 33:13, Matthew 7:23).
In regard to John 5:39, Jesus said that the way to enter eternal life is by obeying God's commandments (Matthew 19:17, Luke 10:25-28), so eternal life can be found in the Scriptures and the Pharisees were correct to search for it there, but they needed to recognize that the goal of everything in Scripture is to testify about how know Christ by practicing his character traits and enter into a relationship with Him in order to have eternal life. Christ is our savior from sin and sin is living in a way that is contrary to God's character, so he is saving us from sin by leading us to live in the way that testifies about His character in obedience to His law.
In Romans 9:30-10:4, they had a zeal for God, but it was not based on knowing Him, so they failed to attain righteousness because they misunderstood the goal of the law by pursuing it as through righteousness were earned as the result of their works in order to establish their own instead of using it as through righteousness were by faith in Christ, for knowing Christ is the goal of the law for righteousness for everyone who has faith. In Matthew 23:23, Jesus said that tithing was something that they ought to be doing while not neglecting weightier matters of the law of justice, mercy, and faithfulness, so they were missing the goal of the law by neglecting to practice character traits of God that His law was given to teach us how to practice. In Philippine 3:8, Paul had been in the same situation, where he had been obeying God's law while neglecting to know Jesus through practicing his character traits, so he had been missing the whole goal of the law and that is what he counted as rubbish. David was saved because he had faith in God's character.
You are inferring things into the Bible that aren't stated therein. When in Hebrews we are informed of a new priesthood (Christ),
then by it, ALL other laws, laws pertaining to the old priesthood (Mosaic laws) - those laws understood to be ends in and of themselves, were satisfied in/by Christ. There is/was only one "perfect" eternal law, and that law is in salvation through Christ. Observe the below. Do you see there are but two laws regarding salvation? One law is the Spirit of life in Christ Jesus; the other law is the law of sin and death. Only the law of the Spirit of life in Christ Jesus can free someone from the law of sin and death. No other laws are pertinent to salvation. It is God alone who moves those He has chosen from the one law to the other upon salvation.
The New Covenant is still made with the same God with the same character traits and therefore the same instructions for how to testify about His character traits. For example, God's righteousness is eternal, so any instructions that He has ever given for how to testify about His righteousness are eternally valid, and if those instructions were to ever change, then God's righteousness would not be eternal. Sin was in the world before the law was given (Romans 5:13), which was people could act in a way that was contrary to God's character before they had been instructed not to do that, so there were no actions that became righteous or sinful when the law was given, but rather the law revealed what has always been and will always be the way to do that. For example, it was sinful to commit adultery in Genesis 39:9 long before the Mosaic Covenant was made, during it, it remains sinful after it has become obsolete, and this will never change.
This is also true for other aspects of God's eternal character that the law was given to teach us how to practice, for example, God's holiness is eternal, therefore the way to be holy as He is holy is also eternal (1 Peter 1:16, Leviticus 11:44-45). By following God's eternal instructions for how to be holy as He is holy, we are testifying that the God of Israel is holy and by refusing to follow those instructions, someone is bearing false witness against the God of Israel by testifying that He is not holy.
[Rom 8:2-3 KJV] 2
For the law of the Spirit of life in Christ Jesus hath made me free from the law of sin and death.
3 For what the law could not do, in that it was weak through the flesh, God sending his own Son in the likeness of sinful flesh, and for sin, condemned sin in the flesh:
In Romans 7:25-8:3, Paul contrasted the Law of God with the law of sin and contrasted the Law of the Spirit of Life with the law of sin and dead, so he equated the Law of God with the Law of the Spirit of Life, after all the Law of God was given by God and the Spirit is God. Moreover, in Romans 8:4-7, Paul contrasted those who walk in the Spirit with those who have minds set on the flesh who are enemies of God who refuse to submit to the Law of God, and the Law of Moses is directly referred to as the Law of God in verses like Nehemiah 8:1-8, Ezra 7:6-12, and Luke 2:22-23. Christ is the embodiment of God's character traits, which he practiced by setting a sinless example of obedience to the Law of Moses, so the only way to have salvation through faith in him is by us choosing to embody God's character traits through following his example.