If God knows everything then God knows your answer to the test before you're even born. Why would God bother to give you the test if he already knows what your answer will be? No one with any sense believes that God, your alleged creator, will punish you for fulfilling the fate that he already knows you're destined for.
In short, you're a fucking idiot.
Some vessels were created in honor of God, and some vessels for dishonor. All of them serve a purpose. All of these vessels had a choice, some accept, some do not. Saul for example persecuted and murdered many Christians, but when the Lord appeared to him he repented. A vessel created for dishonor becomes a vessel of honor. We all have choice, just because God knows the outcome does not matter. Sheesh complicated question, I fear I have not answered it well enough to your likening though : (