Although you may have good reason not to want this individual in your son's life. Ultimately, that judgment call is not up to you. The law gives rights to both biological parents of your child and recognizes the right of each biological parent to know they are a parent. If the court has found cause exists to order the paternity test, then the court has found that this person has a right to know whether they are the biological father of your child.
If you refused to take the court-ordered paternity test, it could result in legal consequences. You may be held on contempt for violating the court order. This could result in fines or criminal charges against you.
To the extent that you cannot bring yourself to comply with the order, it may be worth consulting with a local family law attorney to ensure you understand the full consequences of noncompliance (if that is what you choose to do). Alternatively, you may consider consulting with a local family law attorney to determine what your options are with respect to custody, visitation and support in the event paternity is established.
If you found this answer helpful, let me know by clicking the "Mark as Good Answer" button at the bottom of this answer. It's easy and appreciated. This response is intended to be a general statement of law, should not be relied upon as legal advice, does not create an attorney/client relationship and does not create a right to continuing email exchanges.
Since you have been ordered to take the test and are refusing the court could proceed forward without the test and find that this other person is the parent of the child. Refusing to take the test is considered an admission that the test would find him to be the father.
There may be other steps you can take if he is found to be the father , that legally discourages him and encourages a step parent adoption.
My name is Stephen R. Cohen and I have practiced over 38 years and can be reached at 213-819-1171. I practiced mainly in Los Angeles and Orange County, California. I am not seeking clients from existing relationships with other attorneys, and give only limited advise over the phone (the phone is primarily used to set appointments), these services do not create an attorney client relationship. I apologize for mispelling< as I am a lousy typist, My answers may offend as I do not believe in pulling punches or sugar coating the truth. Further regarding courts in other states my opinions are largely based on logic and what I think is the modern trend which is to consider the needs of the child.