Paternal fraud is a very serious matter that will affect a man his entire life. I am 61 years old, my "son" is 39. He is a drug addict who, to this day, routinely tries to add misery to my life. He drags my family into his daily crises and constantly solicits money. I try to maintain the attitude of a responsible parent, perhaps as a parent with an adopted child, but beneath the surface there is an unconscious gremlin that retains seething resentment. I suppose that if my "son" had been happy, healthy, and successful, I would have a great relationship and would probably remain silent on this subject.
I have strong advise for any young man (and this is the voice of experience talking):
1) If you don’t have pre-marital sex, you won’t have this problem. I know that may seem unrealistic in today’s world, so if you must indulge, practice safe sex.
2) If she says that you are the father, insist, absolutely insist, even at the risk of damaging the relationship, on a paternal DNA test. The future consequences can be severe, you don’t know what life changing burdens may lie ahead. The price (not only financial) is potentially horrendous...and by the way don’t ever think that child support ends at age 18.
I have a suggestion for fixing the problem - I think a paternal DNA test should be required by law every time a father is named on a birth certificate, it isn’t that expensive. If somebody can’t afford it, I would gladly donate to a fund to help pay for it.